]> git.openstreetmap.org Git - rails.git/blobdiff - test/factories/user.rb
Merge branch 'master' into moderation
[rails.git] / test / factories / user.rb
index 802fedd91c71cdb25e4e053b04ff287b36211b4a..8fe768410594dd8e4bf63bc60bab9bdb699a2ec3 100644 (file)
@@ -46,5 +46,13 @@ FactoryGirl.define do
         create(:user_role, :role => "administrator", :user => user)
       end
     end
+
+    factory :super_user do
+      after(:create) do |user, _evaluator|
+        UserRole::ALL_ROLES.each do |role|
+          create(:user_role, :role => role, :user => user)
+        end
+      end
+    end
   end
 end