Don't depend on the database content when loading the tests

closes #7872
This commit is contained in:
Benjamin Neff 2018-09-30 20:59:57 +02:00 committed by Dennis Schubert
parent d765b34018
commit 44452749bc
No known key found for this signature in database
GPG key ID: 5A0304BEA7966D7E

View file

@ -336,16 +336,16 @@ describe UsersController, :type => :controller do
end end
context "with inviter" do context "with inviter" do
[bob, eve].each do |inviter| it "preloads data using gon for the aspect memberships dropdown when sharing with the inviter" do
sharing = !alice.contact_for(inviter.person).nil? alice.invited_by = bob
get :getting_started
expect_gon_preloads_for_aspect_membership_dropdown(:inviter, true)
end
context sharing ? "when sharing" : "when don't share" do it "preloads data using gon for the aspect memberships dropdown when not sharing with the inviter" do
it "preloads data using gon for the aspect memberships dropdown" do alice.invited_by = eve
alice.invited_by = inviter get :getting_started
get :getting_started expect_gon_preloads_for_aspect_membership_dropdown(:inviter, false)
expect_gon_preloads_for_aspect_membership_dropdown(:inviter, sharing)
end
end
end end
end end
end end