features/support/factories.rb in refinerycms-authentication-0.9.9.21 vs features/support/factories.rb in refinerycms-authentication-0.9.9.22
- old
+ new
@@ -14,5 +14,13 @@
Refinery::Plugins.registered.each_with_index do |plugin, index|
user.plugins.create(:name => plugin.name, :position => index)
end
end
end
+
+Factory.define :refinery_translator, :parent => :user do |u|
+ u.roles { [ Role[:refinery], Role[:translator] ] }
+
+ u.after_create do |user|
+ user.plugins.create(:name => 'refinery_pages', :position => 0)
+ end
+end