Skip to content

Commit

Permalink
added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaangiolillo committed Jan 3, 2024
1 parent 39d45ce commit f47c3c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/cli/default_setter_opts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,11 @@ func TestDefaultOpts_Orgs(t *testing.T) {
require.Error(t, err)
require.EqualError(t, err, errNoResults.Error())
})

t.Run("with nil org", func(t *testing.T) {
mockStore.EXPECT().Organizations(gomock.Any()).Return(nil, nil).Times(1)
_, err := opts.orgs("")
require.Error(t, err)
require.EqualError(t, err, errNoResults.Error())
})
}

0 comments on commit f47c3c8

Please sign in to comment.