diff options
author | Michael Muré <batolettre@gmail.com> | 2019-06-19 18:11:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 18:11:31 +0200 |
commit | 89c6732354ba4efd7c36c253fc5d02f0b6c7a7a4 (patch) | |
tree | 1d31091fa66d11a56bcbb9697bcefc2c9ab8951c /repository/git_test.go | |
parent | 777ccb9c68e10bdd9b8a4d33449795dd6e52f768 (diff) | |
parent | acfd8ffdd7b2e019168467810a817a0b6ea084e6 (diff) | |
download | git-bug-89c6732354ba4efd7c36c253fc5d02f0b6c7a7a4.tar.gz |
Merge pull request #156 from A-Hilaly/bridge-rm
Fix bridge rm command
Diffstat (limited to 'repository/git_test.go')
-rw-r--r-- | repository/git_test.go | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/repository/git_test.go b/repository/git_test.go index 32634cfb..8bd3aa8e 100644 --- a/repository/git_test.go +++ b/repository/git_test.go @@ -35,7 +35,6 @@ func TestConfig(t *testing.T) { configs, err = repo.ReadConfigs("section") assert.NoError(t, err) - assert.Equal(t, configs, map[string]string{ "section.key": "value", }) @@ -43,9 +42,25 @@ func TestConfig(t *testing.T) { _, err = repo.ReadConfigBool("section.true") assert.Equal(t, ErrNoConfigEntry, err) + err = repo.RmConfigs("section.nonexistingkey") + assert.Error(t, err) + err = repo.RmConfigs("section.key") assert.NoError(t, err) _, err = repo.ReadConfigString("section.key") assert.Equal(t, ErrNoConfigEntry, err) + + err = repo.RmConfigs("nonexistingsection") + assert.Error(t, err) + + err = repo.RmConfigs("section") + assert.NoError(t, err) + + _, err = repo.ReadConfigString("section.key") + assert.Error(t, err) + + err = repo.RmConfigs("section.key") + assert.Error(t, err) + } |