Commit 3251902b authored by Rémy Coutable's avatar Rémy Coutable

Fix stubbing on method defined in a prepended module

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 0c6505c7
......@@ -392,7 +392,7 @@ describe MergeRequestPresenter do
before do
allow(resource).to receive(:source_branch_exists?) { source_branch_exists }
allow_any_instance_of(::Gitlab::UserAccess)
allow_any_instance_of(Gitlab::UserAccess::RequestCacheExtension)
.to receive(:can_push_to_branch?)
.with(resource.source_branch)
.and_return(can_push_to_branch)
......@@ -462,7 +462,7 @@ describe MergeRequestPresenter do
allow(resource).to receive(:rebase_in_progress?) { rebase_in_progress }
allow(resource).to receive(:should_be_rebased?) { should_be_rebased }
allow_any_instance_of(::Gitlab::UserAccess)
allow_any_instance_of(Gitlab::UserAccess::RequestCacheExtension)
.to receive(:can_push_to_branch?)
.with(resource.source_branch)
.and_return(can_push_to_branch)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment