Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu committed Sep 30, 2020
2 parents f0b4f4e + d362b7d commit e4aaf60
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions cmd/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,3 @@ func Test_ExecuteSnapshotWithInvalidConfig(t *testing.T) {
t.Fatalf("expected output to contain \"%s\" in \"%s\"", subString, string(out))
}
}

func Test_ExecuteSnapshot(t *testing.T) {
cmd := NewRootCmd()
b := bytes.NewBufferString("")
cmd.SetOut(b)
cmd.SetErr(b)
cmd.SetArgs([]string{"snapshot"})
fakeconf := fakeConfig{}
fakeconf.create()
cmd.Execute()
out, err := ioutil.ReadAll(b)
if err != nil {
t.Fatal(err)
}
fakeconf.remove()
subString := "Some values are missing or are incorrect in your config file (run 'cappa init')"
if !strings.Contains(string(out), subString) {
t.Fatalf("expected output to contain \"%s\" in \"%s\"", subString, string(out))
}
}

0 comments on commit e4aaf60

Please sign in to comment.