asciinema.org/spec/features/asciicasts_spec.rb

27 lines
625 B
Ruby
Raw Normal View History

2012-11-18 23:19:42 +00:00
require 'spec_helper'
2013-05-27 19:25:29 +00:00
feature "Asciicast lists" do
2013-10-20 15:26:01 +00:00
let!(:asciicast) { create(:asciicast) }
2012-11-18 23:19:42 +00:00
2013-05-27 19:25:29 +00:00
scenario 'Visiting all' do
visit browse_path
2013-05-27 19:25:29 +00:00
expect(page).to have_content(/All Asciicasts/i)
expect_browse_links
2013-10-20 15:26:01 +00:00
expect(page).to have_link("bashing")
2013-05-27 19:25:29 +00:00
expect(page).to have_selector('.supplimental .play-button')
end
2012-11-18 23:19:42 +00:00
2013-05-27 19:25:29 +00:00
scenario 'Visiting popular' do
visit asciicast_path(asciicast)
2013-05-27 19:25:29 +00:00
visit popular_path
2013-05-27 19:25:29 +00:00
expect(page).to have_content(/Popular Asciicasts/i)
expect_browse_links
2013-10-20 15:26:01 +00:00
expect(page).to have_link("bashing")
2013-05-27 19:25:29 +00:00
expect(page).to have_selector('.supplimental .play-button')
2012-11-18 23:19:42 +00:00
end
end