Skip to content

Commit

Permalink
TestLookupImportersBadUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcvetta committed Aug 26, 2013
1 parent 89c5e87 commit 8b1eaaf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion downtest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ var testApiResponse = apiResponse{
Results: []importer{
importer{
Path: testImporterPath,
Synopsis: "foo bar baz",
Synopsis: "foo",
},
importer{
Path: downtestPackage,
Synopsis: "bar",
},
},
}
Expand All @@ -39,3 +43,9 @@ func TestLookupImporters(t *testing.T) {
assert.Equal(t, 1, len(p.Importers))
assert.Equal(t, testImporterPath, p.Importers[0])
}

func TestLookupImportersBadUrl(t *testing.T) {
apiUrl = "foo bar baz"
_, err := NewPackage("unimportant_package_name")
assert.NotEqual(t, nil, err)
}

0 comments on commit 8b1eaaf

Please sign in to comment.