replace deprectated user=

pull/7338/head
ulferts 6 years ago
parent 6e5b81dc3f
commit 331636635e
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 2
      app/models/member_role.rb
  2. 2
      features/step_definitions/role_steps.rb

@ -98,7 +98,7 @@ class MemberRole < ActiveRecord::Base
end
end
users = inherited_roles_by_member.keys.map(&:user)
users = inherited_roles_by_member.keys.map(&:principal)
Watcher.prune(user: users, project_id: member.project_id) unless users.empty?
end

@ -33,7 +33,7 @@ Given /^the [Uu]ser "([^\"]*)" is a "([^\"]*)" (?:in|of) the [Pp]roject "([^\"]*
p = Project.find_by(name: project) || Project.find_by(identifier: project)
as_admin do
Member.new.tap do |m|
m.user = u
m.principal = u
m.roles << r
m.project = p
end.save!

Loading…
Cancel
Save