diff options
author | pikomonde <32364823+pikomonde@users.noreply.github.com> | 2024-03-21 01:54:24 +0700 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-04-12 08:33:47 +0200 |
commit | 9cf1ca10a20e5897012c853887f8ce64c885cd84 (patch) | |
tree | fd4c145f8212a22c1b3cc985aae5dd201e40bb49 /pkg/commands/git_commands/stash_test.go | |
parent | dc6863b83d5d0a1343ef1e42601ce3dfaf2b60d8 (diff) |
rename sha to hash 5
Diffstat (limited to 'pkg/commands/git_commands/stash_test.go')
-rw-r--r-- | pkg/commands/git_commands/stash_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/commands/git_commands/stash_test.go b/pkg/commands/git_commands/stash_test.go index 3f112cd0c..ad44d7239 100644 --- a/pkg/commands/git_commands/stash_test.go +++ b/pkg/commands/git_commands/stash_test.go @@ -47,7 +47,7 @@ func TestStashSave(t *testing.T) { func TestStashStore(t *testing.T) { type scenario struct { testName string - sha string + hash string message string expected []string } @@ -55,19 +55,19 @@ func TestStashStore(t *testing.T) { scenarios := []scenario{ { testName: "Non-empty message", - sha: "0123456789abcdef", + hash: "0123456789abcdef", message: "New stash name", expected: []string{"stash", "store", "-m", "New stash name", "0123456789abcdef"}, }, { testName: "Empty message", - sha: "0123456789abcdef", + hash: "0123456789abcdef", message: "", expected: []string{"stash", "store", "0123456789abcdef"}, }, { testName: "Space message", - sha: "0123456789abcdef", + hash: "0123456789abcdef", message: " ", expected: []string{"stash", "store", "0123456789abcdef"}, }, @@ -80,7 +80,7 @@ func TestStashStore(t *testing.T) { ExpectGitArgs(s.expected, "", nil) instance := buildStashCommands(commonDeps{runner: runner}) - assert.NoError(t, instance.Store(s.sha, s.message)) + assert.NoError(t, instance.Store(s.hash, s.message)) runner.CheckForMissingCalls() }) } @@ -91,9 +91,9 @@ func TestStashSha(t *testing.T) { ExpectGitArgs([]string{"rev-parse", "refs/stash@{5}"}, "14d94495194651adfd5f070590df566c11d28243\n", nil) instance := buildStashCommands(commonDeps{runner: runner}) - sha, err := instance.Hash(5) + hash, err := instance.Hash(5) assert.NoError(t, err) - assert.Equal(t, "14d94495194651adfd5f070590df566c11d28243", sha) + assert.Equal(t, "14d94495194651adfd5f070590df566c11d28243", hash) runner.CheckForMissingCalls() } |