mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
test: add an integration test for creating tag on branches
This commit is contained in:
parent
67b08ac239
commit
36c2b00336
3 changed files with 52 additions and 0 deletions
|
@ -14,6 +14,10 @@ func (self *Git) CurrentBranchName(expectedName string) *Git {
|
|||
return self.assert("git rev-parse --abbrev-ref HEAD", expectedName)
|
||||
}
|
||||
|
||||
func (self *Git) TagNamesAt(ref string, expectedNames []string) *Git {
|
||||
return self.assert(fmt.Sprintf(`git tag --contains "%s"`, ref), strings.Join(expectedNames, "\n"))
|
||||
}
|
||||
|
||||
func (self *Git) assert(cmdStr string, expected string) *Git {
|
||||
self.assertWithRetries(func() (bool, string) {
|
||||
output, err := self.shell.runCommandWithOutput(cmdStr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue