Browse Source

Fixed unit tests

dependabot/npm_and_yarn/web/prismjs-1.21.0
Max Schmitt 8 years ago
parent
commit
5693ee33bf
  1. 6
      store/store_test.go

6
store/store_test.go

@ -69,7 +69,7 @@ func TestCreateEntry(t *testing.T) {
t.Fatalf("unexpected error: %v", err)
}
defer cleanup(store)
_, err = store.CreateEntry(Entry{})
_, err = store.CreateEntry(Entry{}, "")
if err != ErrNoValidURL {
t.Fatalf("unexpected error: %v", err)
}
@ -78,7 +78,7 @@ func TestCreateEntry(t *testing.T) {
Public: EntryPublicData{
URL: "https://golang.org/",
},
})
}, "")
if err != nil && err != ErrGeneratingIDFailed {
t.Fatalf("unexpected error during creating entry: %v", err)
}
@ -111,7 +111,7 @@ func TestIncreaseVisitCounter(t *testing.T) {
Public: EntryPublicData{
URL: "https://golang.org/",
},
})
}, "")
if err != nil {
t.Fatalf("could not create entry: %v", err)
}

Loading…
Cancel
Save