diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/graphql/mutations/todos/mark_all_done_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/graphql/mutations/todos/mark_all_done_spec.rb')
-rw-r--r-- | spec/graphql/mutations/todos/mark_all_done_spec.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/graphql/mutations/todos/mark_all_done_spec.rb b/spec/graphql/mutations/todos/mark_all_done_spec.rb index f3b6bf52ef7..1e12d86aa18 100644 --- a/spec/graphql/mutations/todos/mark_all_done_spec.rb +++ b/spec/graphql/mutations/todos/mark_all_done_spec.rb @@ -21,26 +21,25 @@ RSpec.describe Mutations::Todos::MarkAllDone do describe '#resolve' do it 'marks all pending todos as done' do - updated_todo_ids, todos = mutation_for(current_user).resolve.values_at(:updated_ids, :todos) + todos = mutation_for(current_user).resolve[:todos] expect(todo1.reload.state).to eq('done') expect(todo2.reload.state).to eq('done') expect(todo3.reload.state).to eq('done') expect(other_user_todo.reload.state).to eq('pending') - expect(updated_todo_ids).to contain_exactly(todo1.id, todo3.id) expect(todos).to contain_exactly(todo1, todo3) end it 'behaves as expected if there are no todos for the requesting user' do - updated_todo_ids = mutation_for(user3).resolve.dig(:updated_ids) + todos = mutation_for(user3).resolve[:todos] expect(todo1.reload.state).to eq('pending') expect(todo2.reload.state).to eq('done') expect(todo3.reload.state).to eq('pending') expect(other_user_todo.reload.state).to eq('pending') - expect(updated_todo_ids).to be_empty + expect(todos).to be_empty end context 'when user is not logged in' do |