mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-16 17:54:07 +01:00
make EqualStringSlice to generic EqualSliceValues (#2179)
just a fly-by refactoring
This commit is contained in:
@@ -161,7 +161,7 @@ func Test_gitea(t *testing.T) {
|
||||
g.Assert(b).IsNotNil()
|
||||
g.Assert(err).IsNil()
|
||||
g.Assert(b.Event).Equal(model.EventPull)
|
||||
g.Assert(utils.EqualStringSlice(b.ChangedFiles, []string{"README.md"})).IsTrue()
|
||||
g.Assert(utils.EqualSliceValues(b.ChangedFiles, []string{"README.md"})).IsTrue()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ func Test_parse(t *testing.T) {
|
||||
g.Assert(pipeline.Message).Equal(hook.Commits[0].Message)
|
||||
g.Assert(pipeline.Avatar).Equal("http://1.gravatar.com/avatar/8c58a0be77ee441bb8f8595b7f1b4e87")
|
||||
g.Assert(pipeline.Author).Equal(hook.Sender.UserName)
|
||||
g.Assert(utils.EqualStringSlice(pipeline.ChangedFiles, []string{"CHANGELOG.md", "app/controller/application.rb"})).IsTrue()
|
||||
g.Assert(utils.EqualSliceValues(pipeline.ChangedFiles, []string{"CHANGELOG.md", "app/controller/application.rb"})).IsTrue()
|
||||
})
|
||||
|
||||
g.It("Should return a Repo struct from a push hook", func() {
|
||||
|
||||
@@ -64,7 +64,7 @@ func Test_parser(t *testing.T) {
|
||||
g.Assert(r).IsNotNil()
|
||||
g.Assert(b).IsNotNil()
|
||||
g.Assert(b.Event).Equal(model.EventPush)
|
||||
g.Assert(utils.EqualStringSlice(b.ChangedFiles, []string{"CHANGELOG.md", "app/controller/application.rb"})).IsTrue()
|
||||
g.Assert(utils.EqualSliceValues(b.ChangedFiles, []string{"CHANGELOG.md", "app/controller/application.rb"})).IsTrue()
|
||||
})
|
||||
})
|
||||
g.Describe("given a push hook from an branch creation", func() {
|
||||
|
||||
Reference in New Issue
Block a user