fixes build
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user