Refactor host_repo -> domain errors (#786)
* Refactor domain errors: New -> E, create helper New and Wrap * Update host repo to use domain errors
This commit is contained in:
1 parent
aa4157639c
commit
ec0020de90
33 files changed
+996
-374
No files matched your search
@@ -48,4 +48,17 @@ func Test_getOpts(t *testing.T) {
|
||||
testOpts.withOp = "alice.bob"
|
||||
assert.Equal(opts, testOpts)
|
||||
})
|
||||
t.Run("WithCode", func(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
// test default
|
||||
opts := GetOpts()
|
||||
testOpts := getDefaultOptions()
|
||||
testOpts.withOp = ""
|
||||
assert.Equal(opts, testOpts)
|
||||
|
||||
// try setting it
|
||||
opts = GetOpts(WithCode(NotUnique))
|
||||
testOpts.withCode = NotUnique
|
||||
assert.Equal(opts, testOpts)
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user