summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/user.rb2
-rw-r--r--spec/support/mentionable_shared_examples.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 18f4bbda866..3080851548e 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -80,7 +80,7 @@ class User < ActiveRecord::Base
# Groups
has_many :users_groups, dependent: :destroy
has_many :groups, through: :users_groups
- has_many :owned_groups, -> { where user_group: { group_access: UsersGroup::OWNER } }, through: :users_groups, source: :group
+ has_many :owned_groups, -> { where users_groups: { group_access: UsersGroup::OWNER } }, through: :users_groups, source: :group
# Projects
has_many :groups_projects, through: :groups, source: :projects
has_many :personal_projects, through: :namespace, source: :projects
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb
index a7f189777c8..948fff27b89 100644
--- a/spec/support/mentionable_shared_examples.rb
+++ b/spec/support/mentionable_shared_examples.rb
@@ -12,7 +12,7 @@ def common_mentionable_setup
let(:mentioned_issue) { create :issue, project: mproject }
let(:other_issue) { create :issue, project: mproject }
let(:mentioned_mr) { create :merge_request, target_project: mproject, source_branch: 'different' }
- let(:mentioned_commit) { mock('commit', sha: '1234567890abcdef').as_null_object }
+ let(:mentioned_commit) { double('commit', sha: '1234567890abcdef').as_null_object }
# Override to add known commits to the repository stub.
let(:extra_commits) { [] }
@@ -30,7 +30,7 @@ def common_mentionable_setup
commitmap = { '123456' => mentioned_commit }
extra_commits.each { |c| commitmap[c.sha[0..5]] = c }
- repo = mock('repository')
+ repo = double('repository')
repo.stub(:commit) { |sha| commitmap[sha] }
mproject.stub(repository: repo)