Skip to content
Snippets Groups Projects
Unverified Commit 9039fad2 authored by Doug Stull's avatar Doug Stull
Browse files

Remove redundant instance methods from members

- not needed as belongs_to covers it.
parent 1cf5e3de
No related merge requests found
......@@ -34,10 +34,6 @@ def self.access_levels
Gitlab::Access.sym_options_with_owner
end
def group
source
end
# Because source_type is `Namespace`...
def real_source_type
'Group'
......
......@@ -86,10 +86,6 @@ def can_update_member?(current_user, member)
end
end
def project
source
end
def owner?
project.owner == user
end
......
......@@ -3,6 +3,10 @@
require 'spec_helper'
RSpec.describe GroupMember do
describe 'associations' do
it { is_expected.to belong_to(:group).with_foreign_key(:source_id) }
end
context 'scopes' do
let_it_be(:user_1) { create(:user) }
let_it_be(:user_2) { create(:user) }
......
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