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:
Javi Martín
2024-10-04 20:19:58 +02:00
parent aa5c244414
commit af0911a8d2
2 changed files with 5 additions and 1 deletions

View File

@@ -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 { [] }

View File

@@ -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)