summaryrefslogtreecommitdiff
path: root/spec/graphql/mutations/todos/restore_many_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/mutations/todos/restore_many_spec.rb')
-rw-r--r--spec/graphql/mutations/todos/restore_many_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/graphql/mutations/todos/restore_many_spec.rb b/spec/graphql/mutations/todos/restore_many_spec.rb
index 8f4a8985f9e..b3b3e057745 100644
--- a/spec/graphql/mutations/todos/restore_many_spec.rb
+++ b/spec/graphql/mutations/todos/restore_many_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe Mutations::Todos::RestoreMany do
+RSpec.describe Mutations::Todos::RestoreMany do
let_it_be(:current_user) { create(:user) }
let_it_be(:author) { create(:user) }
let_it_be(:other_user) { create(:user) }
@@ -25,6 +25,8 @@ describe Mutations::Todos::RestoreMany do
todo_ids = result[:updated_ids]
expect(todo_ids.size).to eq(1)
expect(todo_ids.first).to eq(todo1.to_global_id.to_s)
+
+ expect(result[:todos]).to contain_exactly(todo1)
end
it 'handles a todo which is already pending as expected' do
@@ -33,6 +35,7 @@ describe Mutations::Todos::RestoreMany do
expect_states_were_not_changed
expect(result[:updated_ids]).to eq([])
+ expect(result[:todos]).to be_empty
end
it 'ignores requests for todos which do not belong to the current user' do
@@ -56,6 +59,7 @@ describe Mutations::Todos::RestoreMany do
returned_todo_ids = result[:updated_ids]
expect(returned_todo_ids).to contain_exactly(todo1.to_global_id.to_s, todo4.to_global_id.to_s)
+ expect(result[:todos]).to contain_exactly(todo1, todo4)
expect(todo1.reload.state).to eq('pending')
expect(todo2.reload.state).to eq('pending')