diff options
Diffstat (limited to 'spec/graphql/mutations/todos/mark_all_done_spec.rb')
-rw-r--r-- | spec/graphql/mutations/todos/mark_all_done_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/graphql/mutations/todos/mark_all_done_spec.rb b/spec/graphql/mutations/todos/mark_all_done_spec.rb index 4af00307969..2f167164050 100644 --- a/spec/graphql/mutations/todos/mark_all_done_spec.rb +++ b/spec/graphql/mutations/todos/mark_all_done_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Mutations::Todos::MarkAllDone do +RSpec.describe Mutations::Todos::MarkAllDone do include GraphqlHelpers let_it_be(:current_user) { create(:user) } @@ -21,7 +21,7 @@ describe Mutations::Todos::MarkAllDone do describe '#resolve' do it 'marks all pending todos as done' do - updated_todo_ids = mutation_for(current_user).resolve.dig(:updated_ids) + updated_todo_ids, todos = mutation_for(current_user).resolve.values_at(:updated_ids, :todos) expect(todo1.reload.state).to eq('done') expect(todo2.reload.state).to eq('done') @@ -29,6 +29,7 @@ describe Mutations::Todos::MarkAllDone do expect(other_user_todo.reload.state).to eq('pending') expect(updated_todo_ids).to contain_exactly(global_id_of(todo1), global_id_of(todo3)) + expect(todos).to contain_exactly(todo1, todo3) end it 'behaves as expected if there are no todos for the requesting user' do |