Test access to organization_admin version as organization_admin
This corrects the specification for the behavior of the Revision History screen; changes to the organization administrator role should be accessible to organization administrators, not conference organizers.
This commit is contained in:
parent
aa61ec9692
commit
71d9860124
2 changed files with 14 additions and 0 deletions
|
|
@ -59,6 +59,17 @@ FactoryBot.define do
|
|||
biography { '<div id="divInjectedElement"></div>' }
|
||||
end
|
||||
|
||||
factory :organization_admin, parent: :user do
|
||||
transient do
|
||||
organization { create(:organization) }
|
||||
end
|
||||
|
||||
after(:create) do |user, evaluator|
|
||||
user.roles << Role.find_or_create_by(name: 'organization_admin', resource: evaluator.organization)
|
||||
user.save!
|
||||
end
|
||||
end
|
||||
|
||||
factory :organizer, parent: :user do
|
||||
transient do
|
||||
resource { create(:resource) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue