spec/factories.rb in hydra-access-controls-8.2.0 vs spec/factories.rb in hydra-access-controls-9.0.0.beta1

- old
+ new

@@ -1,19 +1,19 @@ FactoryGirl.define do - + # Users - + # Prototype user factory factory :user, :aliases => [:owner] do |u| sequence :uid do |n| "person#{n}" end email { "#{uid}@example.com" } password { uid } new_record false end - + factory :archivist, :parent=>:user do |u| uid 'archivist1' password 'archivist1' end factory :registered_user, :parent=>:user do |u| @@ -69,37 +69,37 @@ uid 'alice_admin' password 'alice_admin' roles { ["repository-admin"] } end - # + # # Repository Objects # - + factory :asset, :class => ModsAsset do |o| end - + factory :admin_policy, :class => Hydra::AdminPolicy do |o| end - + factory :default_access_asset, :parent=>:asset do |a| - permissions_attributes [{:name=>"joe_creator", :access=>"edit", :type=>"user"}] + permissions_attributes [{ name: "joe_creator", access: "edit", type: "person" }] end - + factory :dept_access_asset, :parent=>:asset do |a| - permissions_attributes [{:name=>"africana-faculty", :access=>"read", :type=>"group"}, {:name=>"joe_creator", :access=>"edit", :type=>"user"}] + permissions_attributes [{ name: "africana-faculty", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }] end factory :group_edit_asset, :parent=>:asset do |a| - permissions_attributes [{:name=>"africana-faculty", :access=>"edit", :type=>"group"}, {:name=>"calvin_collaborator", :access=>"edit", :type=>"user"}] + permissions_attributes [{ name:"africana-faculty", access: "edit", type: "group" }, {name: "calvin_collaborator", access: "edit", type: "person"}] end - + factory :org_read_access_asset, :parent=>:asset do |a| - permissions_attributes [{:name=>"registered", :access=>"read", :type=>"group"}, {:name=>"joe_creator", :access=>"edit", :type=>"user"}, {:name=>"calvin_collaborator", :access=>"edit", :type=>"user"}] + permissions_attributes [{ name: "registered", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }, { name: "calvin_collaborator", access: "edit", type: "person" }] end - + factory :open_access_asset, :parent=>:asset do |a| - permissions_attributes [{:name=>"public", :access=>"read", :type=>"group"}, {:name=>"joe_creator", :access=>"edit", :type=>"user"}, {:name=>"calvin_collaborator", :access=>"edit", :type=>"user"}] + permissions_attributes [{ name: "public", access: "read", type: "group" }, { name: "joe_creator", access: "edit", type: "person" }, { name: "calvin_collaborator", access: "edit", type: "person" }] end end