Fix warning in hidden proposals spec
We were checking the proposal video URL, but its value was `nil` since
commit bedcb5bca2. This resulted in a warning:
```
Checking for expected text of nil is confusing and/or pointless since it
will always match. Please specify a string or regexp instead.
spec/system/admin/hidden_proposals_spec.rb:14
```
This commit is contained in:
@@ -80,6 +80,10 @@ FactoryBot.define do
|
|||||||
after(:create) { |proposal| create(:image, imageable: proposal) }
|
after(:create) { |proposal| create(:image, imageable: proposal) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
trait :with_video do
|
||||||
|
video_url { "https://youtu.be/nhuNb0XtRhQ" }
|
||||||
|
end
|
||||||
|
|
||||||
transient do
|
transient do
|
||||||
voters { [] }
|
voters { [] }
|
||||||
followers { [] }
|
followers { [] }
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ require "rails_helper"
|
|||||||
|
|
||||||
describe "Admin hidden proposals", :admin do
|
describe "Admin hidden proposals", :admin do
|
||||||
scenario "List shows all relevant info" do
|
scenario "List shows all relevant info" do
|
||||||
proposal = create(:proposal, :hidden)
|
proposal = create(:proposal, :with_video, :hidden)
|
||||||
visit admin_hidden_proposals_path
|
visit admin_hidden_proposals_path
|
||||||
|
|
||||||
expect(page).to have_content(proposal.title)
|
expect(page).to have_content(proposal.title)
|
||||||
|
|||||||
Reference in New Issue
Block a user