2013-05-27 19:25:29 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
feature "Asciicast page", :js => true do
|
|
|
|
|
2014-02-12 19:51:01 +00:00
|
|
|
let!(:user) { create(:user, username: 'aaron') }
|
2013-11-18 12:01:35 +00:00
|
|
|
let!(:asciicast) { create(:asciicast, user: user, title: 'the title') }
|
|
|
|
let!(:other_asciicast) { create(:asciicast, user: user) }
|
2013-05-27 19:25:29 +00:00
|
|
|
|
|
|
|
scenario 'Visiting as guest' do
|
|
|
|
visit asciicast_path(asciicast)
|
|
|
|
|
2013-11-18 12:01:35 +00:00
|
|
|
expect(page).to have_content('the title')
|
|
|
|
expect(page).to have_link('aaron')
|
|
|
|
expect(page).to have_link('Embed')
|
|
|
|
expect(page).to have_selector('.cinema .play-button')
|
2013-05-27 19:25:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|