Skip to content

Commit

Permalink
🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonrudolph committed Jul 18, 2021
1 parent cbc5161 commit d914de0
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions internal/cmd/submit/submit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,14 @@ func TestSubmit_Init_invalidEnv(t *testing.T) {
func TestSubmit_Init_invalidPath(t *testing.T) {
t.Run("NonexistentPath", func(t *testing.T) {
s := NewSubmit(&metadata.Version{}, logger.New())
err := s.Init([]string{"some-nonexistent-path", "--account-id", "42", "--repository-id", "8675309"}, exampleEnv, &stubCommitResolverFactory{})
err := s.Init([]string{
"some-nonexistent-path",
"--account-id", "42",
"--repository-id", "8675309",
},
exampleEnv,
&stubCommitResolverFactory{},
)
if assert.Error(t, err) {
assert.Equal(t, "path is not a directory: some-nonexistent-path", err.Error())
}
Expand All @@ -234,7 +241,14 @@ func TestSubmit_Init_invalidPath(t *testing.T) {
defer os.Remove(tmpfile.Name())

s := NewSubmit(&metadata.Version{}, logger.New())
err = s.Init([]string{tmpfile.Name(), "--account-id", "42", "--repository-id", "8675309"}, exampleEnv, &stubCommitResolverFactory{})
err = s.Init([]string{
tmpfile.Name(),
"--account-id", "42",
"--repository-id", "8675309",
},
exampleEnv,
&stubCommitResolverFactory{},
)
if assert.Error(t, err) {
assert.Regexp(t, "path is not a directory: ", err.Error())
}
Expand Down

0 comments on commit d914de0

Please sign in to comment.