command: Fix TestWorkspace_createWithState

The State.Equal function is now more precise than this test needs. It's
only trying to distinguish between an empty state and a non-empty state,
so the string representation of state is good enough to get that done
while disregarding other subtle differences.
This commit is contained in:
Martin Atkins 2018-11-07 10:49:10 -08:00
parent 1be09745d7
commit 0ea8aa6fe5
1 changed files with 2 additions and 2 deletions

View File

@ -276,8 +276,8 @@ func TestWorkspace_createWithState(t *testing.T) {
newState := sMgr.State()
if !originalState.Equal(newState) {
t.Fatalf("states not equal\norig: %s\nnew: %s", originalState, newState)
if got, want := newState.String(), originalState.String(); got != want {
t.Fatalf("states not equal\ngot: %s\nwant: %s", got, want)
}
}