func TestUnlockResponseDoesNotAllowLockAndError(t *testing.T) { schema.Refute(t, schema.UnlockResponseSchema, &api.UnlockResponse{ Lock: &api.Lock{ Id: "some-lock-id", }, Err: "some-error", }) }
func TestLockListWithErrorAndLocks(t *testing.T) { schema.Refute(t, schema.LockListSchema, &api.LockList{ Locks: []api.Lock{ api.Lock{Id: "foo"}, api.Lock{Id: "bar"}, }, Err: "this isn't possible!", }) }
func TestLockResponseInvalidWithCommitAndError(t *testing.T) { schema.Refute(t, schema.LockResponseSchema, &api.LockResponse{ Err: "some error", CommitNeeded: "deadbeef", }) }