fixes build

This commit is contained in:
Juanjo Bazán
2015-10-03 13:12:15 +02:00
parent 78c186242f
commit b9275f1ddd
2 changed files with 1 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
# Default admin user (change password after first deploy to a server!) # Default admin user (change password after first deploy to a server!)
if Administrator.count == 0 if Administrator.count == 0 && !Rails.env.test?
admin = User.create!(username: 'admin', email: 'admin@madrid.es', password: '12345678', password_confirmation: '12345678', confirmed_at: Time.now, terms_of_service: "1") admin = User.create!(username: 'admin', email: 'admin@madrid.es', password: '12345678', password_confirmation: '12345678', confirmed_at: Time.now, terms_of_service: "1")
admin.create_administrator admin.create_administrator
end end

View File

@@ -42,16 +42,10 @@ feature 'Stats' do
end end
scenario 'Users' do scenario 'Users' do
Administrator.destroy_all
User.all.map(&:really_destroy!)
1.times { create(:user, :level_three) } 1.times { create(:user, :level_three) }
2.times { create(:user, :level_two) } 2.times { create(:user, :level_two) }
3.times { create(:user) } 3.times { create(:user) }
admin = create(:administrator)
login_as(admin.user)
visit admin_stats_path visit admin_stats_path
expect(page).to have_content "Level three users 1" expect(page).to have_content "Level three users 1"