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
context sharing ? "when sharing" : "when don't share" do
it "preloads data using gon for the aspect memberships dropdown" do
alice.invited_by = inviter
get :getting_started get :getting_started
expect_gon_preloads_for_aspect_membership_dropdown(:inviter, sharing) expect_gon_preloads_for_aspect_membership_dropdown(:inviter, true)
end end
end
it "preloads data using gon for the aspect memberships dropdown when not sharing with the inviter" do
alice.invited_by = eve
get :getting_started
expect_gon_preloads_for_aspect_membership_dropdown(:inviter, false)
end end
end end
end end