2014-08-30 17:38:47 +00:00
|
|
|
require 'rails_helper'
|
2013-05-27 19:25:29 +00:00
|
|
|
|
|
|
|
feature "Homepage", :js => true do
|
|
|
|
|
2013-10-20 15:26:01 +00:00
|
|
|
let!(:user) { create(:user) }
|
2013-11-17 15:49:46 +00:00
|
|
|
let!(:asciicast) { create(:asciicast, user: user, title: 'the title') }
|
2013-05-27 19:25:29 +00:00
|
|
|
|
|
|
|
scenario 'Visiting' do
|
|
|
|
visit root_path
|
|
|
|
|
|
|
|
expect(page).to have_link('Browse')
|
2013-10-20 15:26:01 +00:00
|
|
|
expect(page).to have_link('Docs')
|
2014-12-17 10:45:10 +00:00
|
|
|
expect(page).to have_button('Start Recording')
|
2013-11-17 15:49:46 +00:00
|
|
|
expect(page).to have_content(/Featured asciicasts/i)
|
|
|
|
expect(page).to have_content(/Latest asciicasts/i)
|
|
|
|
expect(page).to have_link("the title")
|
2013-05-27 19:25:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|