Explicitly use rack driver in dashboard test

There seems to be a bug in the dashboard when calculating
`accumulat_supports` because in some cases `vote_weight` is `nil`.

Besides, these tests check the database after the browser has started,
instead of checking things from a user's point of view.

Since both the tests and the code are wrong, and I'm not familiar enough
with the code in the dashboard section, for now I'm leaving things as
they were.
This commit is contained in:
Javi Martín
2021-03-27 14:07:20 +01:00
parent 56317c771a
commit 8a7555092f

View File

@@ -26,7 +26,7 @@ describe "Proposal Notifications" do
expect(page).to have_content "Please share it with others so we can make it happen!"
end
scenario "Send a notification (Active voter)" do
scenario "Send a notification (Active voter)", :no_js do
proposal = create(:proposal)
create(:user, :level_two, votables: [proposal], followables: [proposal])
@@ -35,7 +35,7 @@ describe "Proposal Notifications" do
expect(Notification.count).to eq(1)
end
scenario "Send a notification (Follower)" do
scenario "Send a notification (Follower)", :no_js do
proposal = create(:proposal)
create(:user, :level_two, followables: [proposal])
@@ -44,7 +44,7 @@ describe "Proposal Notifications" do
expect(Notification.count).to eq(1)
end
scenario "Send a notification (Follower and Voter)" do
scenario "Send a notification (Follower and Voter)", :no_js do
proposal = create(:proposal)
create(:user, followables: [proposal], votables: [proposal])
@@ -55,7 +55,7 @@ describe "Proposal Notifications" do
expect(Notification.count).to eq(2)
end
scenario "Send a notification (Blocked voter)" do
scenario "Send a notification (Blocked voter)", :no_js do
proposal = create(:proposal)
voter = create(:user, :level_two, votables: [proposal])
@@ -65,7 +65,7 @@ describe "Proposal Notifications" do
expect(Notification.count).to eq(0)
end
scenario "Send a notification (Erased voter)" do
scenario "Send a notification (Erased voter)", :no_js do
proposal = create(:proposal)
voter = create(:user, :level_two, votables: [proposal])