Skip to content

Commit

Permalink
Add get flag test for 404 status code
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzhuojie committed Mar 19, 2020
1 parent 0febaaf commit 50c40f5
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 50c40f5

Please sign in to comment.