Skip to content

Commit

Permalink
Add topics in tests gists
Browse files Browse the repository at this point in the history
  • Loading branch information
thomiceli committed Jan 23, 2025
1 parent 9705c0d commit a2aebe6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/web/test/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func TestAdminUser(t *testing.T) {
},
Name: []string{"gist1.txt"},
Content: []string{"yeah"},
Topics: "",
}
err := s.Request("POST", "/", gist1, 302)
require.NoError(t, err)
Expand Down Expand Up @@ -170,6 +171,7 @@ func TestAdminGist(t *testing.T) {
},
Name: []string{"gist1.txt"},
Content: []string{"yeah"},
Topics: "",
}
err := s.Request("POST", "/", gist1, 302)
require.NoError(t, err)
Expand Down
4 changes: 4 additions & 0 deletions internal/web/test/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func TestAnonymous(t *testing.T) {
},
Name: []string{"gist1.txt", "gist2.txt", "gist3.txt"},
Content: []string{"yeah", "yeah\ncool", "yeah\ncool gist actually"},
Topics: "",
}
err = s.Request("POST", "/", gist1, 302)
require.NoError(t, err)
Expand Down Expand Up @@ -164,6 +165,7 @@ func TestGitOperations(t *testing.T) {
Content: []string{
"yeah",
},
Topics: "",
}
err := s.Request("POST", "/", gist1, 302)
require.NoError(t, err)
Expand All @@ -179,6 +181,7 @@ func TestGitOperations(t *testing.T) {
Content: []string{
"cool",
},
Topics: "",
}
err = s.Request("POST", "/", gist2, 302)
require.NoError(t, err)
Expand All @@ -194,6 +197,7 @@ func TestGitOperations(t *testing.T) {
Content: []string{
"super",
},
Topics: "",
}
err = s.Request("POST", "/", gist3, 302)
require.NoError(t, err)
Expand Down
6 changes: 6 additions & 0 deletions internal/web/test/gist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestGists(t *testing.T) {
},
Name: []string{"gist1.txt", "gist2.txt", "gist3.txt"},
Content: []string{"yeah", "yeah\ncool", "yeah\ncool gist actually"},
Topics: "",
}
err = s.Request("POST", "/", gist1, 302)
require.NoError(t, err)
Expand Down Expand Up @@ -63,6 +64,7 @@ func TestGists(t *testing.T) {
},
Name: []string{"", "gist2.txt", "gist3.txt"},
Content: []string{"", "yeah\ncool", "yeah\ncool gist actually"},
Topics: "",
}
err = s.Request("POST", "/", gist2, 200)
require.NoError(t, err)
Expand All @@ -75,6 +77,7 @@ func TestGists(t *testing.T) {
},
Name: []string{""},
Content: []string{"yeah"},
Topics: "",
}
err = s.Request("POST", "/", gist3, 302)
require.NoError(t, err)
Expand Down Expand Up @@ -118,6 +121,7 @@ func TestVisibility(t *testing.T) {
},
Name: []string{""},
Content: []string{"yeah"},
Topics: "",
}
err := s.Request("POST", "/", gist1, 302)
require.NoError(t, err)
Expand Down Expand Up @@ -160,6 +164,7 @@ func TestLikeFork(t *testing.T) {
},
Name: []string{""},
Content: []string{"yeah"},
Topics: "",
}
err := s.Request("POST", "/", gist1, 302)
require.NoError(t, err)
Expand Down Expand Up @@ -252,6 +257,7 @@ func TestCustomUrl(t *testing.T) {
},
Name: []string{"gist1.txt", "gist2.txt", "gist3.txt"},
Content: []string{"yeah", "yeah\ncool", "yeah\ncool gist actually"},
Topics: "",
}
err = s.Request("POST", "/", gist2, 302)
require.NoError(t, err)
Expand Down

0 comments on commit a2aebe6

Please # to comment.