Skip to content

Commit

Permalink
new file: spec/features/podcasts/index_spec.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
o-200 committed Dec 26, 2024
1 parent a617a44 commit 8a808e6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions spec/features/podcasts/index_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require 'rails_helper'

RSpec.feature "Podcasts#index", type: :feature do
before do
10.times { FactoryBot.create(:podcast) }
visit podcasts_path
end

context do
context "podcast cards" do
scenario 'container frame' do
expect(page).to have_selector("turbo-frame#podcast_frame")
end

scenario 'sees all podcast cards' do
expect(page).to have_css('.card', count: 10)
expect(page).to have_css('.card-title', count: 10)
expect(page).to have_css('a.text-decoration-none', count: 10)
expect(page).to have_css('.card-footer', count: 10)
expect(page).to have_css('img.card-img-top', count: 10)
end
end
end
end

0 comments on commit 8a808e6

Please sign in to comment.