Check error

This commit is contained in:
Fedor Korotkiy 2020-04-21 00:07:18 +03:00
parent c956826073
commit d705570870

View file

@ -81,6 +81,7 @@ func TestBuildStartError(t *testing.T) {
env.mock.EXPECT().StartBuild(gomock.Any(), gomock.Any(), gomock.Any()).Return(fmt.Errorf("foo bar error")) env.mock.EXPECT().StartBuild(gomock.Any(), gomock.Any(), gomock.Any()).Return(fmt.Errorf("foo bar error"))
_, _, err := env.client.StartBuild(ctx, &api.BuildRequest{}) _, _, err := env.client.StartBuild(ctx, &api.BuildRequest{})
require.Error(t, err)
require.Contains(t, err.Error(), "foo bar error") require.Contains(t, err.Error(), "foo bar error")
} }