summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-03-07 22:39:17 -0500
committerRobert Speicher <rspeicher@gmail.com>2017-03-07 22:39:17 -0500
commitc52b6c2a791920680cbc5258e02795a2c88e8d2b (patch)
treefdac96d488b39d539a24da701b818cf1b73d46f9
parente17bc3afc565bd13aa77380b2926fbae17ecf94f (diff)
downloadgitlab-ce-c52b6c2a791920680cbc5258e02795a2c88e8d2b.tar.gz
Fix transient failure in TodoService spec
For reasons unknown, the lack of `and_call_original` on this message expectation was causing a transient failure depending on test order. We narrowed it down using `rspec --bisect` to the following order: spec/requests/openid_connect_spec.rb:123 spec/services/todo_service_spec.rb:751
-rw-r--r--spec/services/todo_service_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb
index fb9a8462f84..a8395cb48ea 100644
--- a/spec/services/todo_service_spec.rb
+++ b/spec/services/todo_service_spec.rb
@@ -752,7 +752,7 @@ describe TodoService, services: true do
issue = create(:issue, project: project, assignee: john_doe, author: author, description: mentions)
expect(john_doe.todos_pending_count).to eq(0)
- expect(john_doe).to receive(:update_todos_count_cache)
+ expect(john_doe).to receive(:update_todos_count_cache).and_call_original
service.new_issue(issue, author)