Skip to content

Commit

Permalink
Merge pull request #337 from checkr/zz/add-404-get-flag-test
Browse files Browse the repository at this point in the history
Add 404 get flag test
  • Loading branch information
zhouzhuojie authored Mar 19, 2020
2 parents 0febaaf + 50c40f5 commit d8436c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/handler/crud_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ func TestCrudFlags(t *testing.T) {
assert.NotZero(t, res.(*flag.GetFlagOK).Payload.Key)
})

t.Run("it should return 404 not found if flag is not there", func(t *testing.T) {
res = c.GetFlag(flag.GetFlagParams{FlagID: int64(4444444)})
assert.NotZero(t, res.(*flag.GetFlagDefault))
})

t.Run("it should be able to get preloaded segments and variants", func(t *testing.T) {
c.CreateSegment(segment.CreateSegmentParams{
FlagID: int64(1),
Expand Down

0 comments on commit d8436c1

Please sign in to comment.