1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-12-05 22:53:44 +02:00

refactor project tests + go fmt

This commit is contained in:
Evgen Kostenko
2016-06-02 15:59:40 +03:00
parent c9ac91a57c
commit c66958e3f2
2 changed files with 3 additions and 3 deletions

View File

@@ -3,10 +3,10 @@ package jira
import ( import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"fmt"
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
"fmt"
) )
// A Client manages communication with the JIRA API. // A Client manages communication with the JIRA API.

View File

@@ -55,7 +55,7 @@ func TestProjectGet(t *testing.T) {
} }
} }
func TestProjectWrongGet(t *testing.T) { func TestProjectGet_NoProject(t *testing.T) {
setup() setup()
defer teardown() defer teardown()
testApiEdpoint := "/rest/api/2/project/99999999" testApiEdpoint := "/rest/api/2/project/99999999"
@@ -66,7 +66,7 @@ func TestProjectWrongGet(t *testing.T) {
fmt.Fprint(w, nil) fmt.Fprint(w, nil)
}) })
projects, resp, err := testClient.Project.Get("12310505") projects, resp, err := testClient.Project.Get("99999999")
if projects != nil { if projects != nil {
t.Errorf("Expected nil. Got %s", projects) t.Errorf("Expected nil. Got %s", projects)
} }