Skip to content

Commit

Permalink
Update list_test.go to include topics as well
Browse files Browse the repository at this point in the history
  • Loading branch information
lepasq committed Aug 15, 2021
1 parent 87e5e6f commit 998a29d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pkg/cmd/repo/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: false,
Language: "",
Topic: "",
Archived: false,
NonArchived: false,
},
Expand All @@ -49,6 +50,7 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: false,
Language: "",
Topic: "",
Archived: false,
NonArchived: false,
},
Expand All @@ -63,6 +65,7 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: false,
Language: "",
Topic: "",
Archived: false,
NonArchived: false,
},
Expand All @@ -77,6 +80,7 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: false,
Language: "",
Topic: "",
Archived: false,
NonArchived: false,
},
Expand All @@ -91,6 +95,7 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: false,
Language: "",
Topic: "",
Archived: false,
NonArchived: false,
},
Expand All @@ -105,6 +110,7 @@ func TestNewCmdList(t *testing.T) {
Fork: true,
Source: false,
Language: "",
Topic: "",
Archived: false,
NonArchived: false,
},
Expand All @@ -119,6 +125,7 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: true,
Language: "",
Topic: "",
Archived: false,
NonArchived: false,
},
Expand All @@ -133,6 +140,7 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: false,
Language: "go",
Topic: "",
Archived: false,
NonArchived: false,
},
Expand All @@ -147,6 +155,7 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: false,
Language: "",
Topic: "",
Archived: true,
NonArchived: false,
},
Expand All @@ -161,10 +170,26 @@ func TestNewCmdList(t *testing.T) {
Fork: false,
Source: false,
Language: "",
Topic: "",
Archived: false,
NonArchived: true,
},
},
{
name: "with topic",
cli: "--topic cli",
wants: ListOptions{
Limit: 30,
Owner: "",
Visibility: "",
Fork: false,
Source: false,
Language: "",
Topic: "cli",
Archived: false,
NonArchived: false,
},
},
{
name: "no public and private",
cli: "--public --private",
Expand Down Expand Up @@ -220,6 +245,7 @@ func TestNewCmdList(t *testing.T) {
assert.Equal(t, tt.wants.Owner, gotOpts.Owner)
assert.Equal(t, tt.wants.Visibility, gotOpts.Visibility)
assert.Equal(t, tt.wants.Fork, gotOpts.Fork)
assert.Equal(t, tt.wants.Topic, gotOpts.Topic)
assert.Equal(t, tt.wants.Source, gotOpts.Source)
assert.Equal(t, tt.wants.Archived, gotOpts.Archived)
assert.Equal(t, tt.wants.NonArchived, gotOpts.NonArchived)
Expand Down

0 comments on commit 998a29d

Please sign in to comment.