Move login_as after creating data for a test

It doesn't really affect the tests, but it helps isolate useless
assignments, and we already did it this way 94% of the time.
This commit is contained in:
Javi Martín
2019-09-23 00:51:37 +02:00
parent 24aa4744f1
commit 5cbd160f11
15 changed files with 64 additions and 84 deletions

View File

@@ -3,9 +3,8 @@ require "rails_helper"
describe "Admin Notifications" do
before do
admin = create(:administrator)
login_as(admin.user)
create(:budget)
login_as(create(:administrator).user)
end
context "Show" do