2013-05-27 19:25:29 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
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')
|
2013-11-17 15:49:46 +00:00
|
|
|
expect(page).to have_link('Start Recording')
|
|
|
|
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
|