test/integration/clips_show_test.rb in kinney-0.0.1 vs test/integration/clips_show_test.rb in kinney-0.0.2
- old
+ new
@@ -1,33 +1,36 @@
require 'test_helper'
class ClipsShowTest < ActionDispatch::IntegrationTest
- test "should show basic information about a clip" do
+
+ extend TestWithCassette
+
+ test "should show basic information about a clip", :clips_show do
visit(kinney.clip_path(kinney_clips(:tolson_roots)))
assert page.has_selector?('h1', :text => 'Tolson')
assert page.has_selector?('h1', :text => 'Growing Up in Edgecombe County')
assert page.has_selector?('video')
end
- test "should have link to other videos by the same person" do
+ test "should have link to other videos by the same person", :clips_show do
visit(kinney.clip_path(kinney_clips(:tolson_roots)))
assert page.has_selector?('#person_videos a', :text => 'Mentors')
end
- test "should have link to profile" do
+ test "should have link to profile", :clips_show do
visit(kinney.clip_path(kinney_clips(:tolson_roots)))
assert page.has_selector?('#related_people a', :text => 'Edward Norris Tolson')
assert page.has_selector?('#related_people a img')
end
- test "should show the transcript" do
+ test "should show the transcript", :clips_show do
visit(kinney.clip_path(kinney_clips(:atkins_fire)))
assert page.has_selector?('h2', :text => 'Transcript')
assert page.has_content?('It was a frightening time')
end
- test "should expand/collapse the transcript" do
+ test "should expand/collapse the transcript", :clips_show do
browser_start
# stubs out saving the tracker to work around a sqlite database locking issue
Kinney::Tracker.any_instance.stubs(:save).returns(true)
visit(kinney.clip_path(kinney_clips(:atkins_fire)))
assert_false page.find('#transcript_table tbody tr:nth-child(4)').visible?
@@ -39,20 +42,20 @@
page.find('#hide_transcript_button').click
assert_false page.find('#transcript_table tbody tr:nth-child(4)').visible?
browser_end
end
- test "should show other clips related by topic" do
+ test "should show other clips related by topic", :clips_show do
visit(kinney.clip_path(kinney_clips(:tolson_roots)))
assert page.has_selector?('#topic_clips a', :text => 'Applying to NC State')
end
- test "should not see Video Topics section on page" do
+ test "should not see Video Topics section on page", :clips_show do
visit(kinney.clip_path(kinney_clips(:tolson_roots)))
assert page.has_no_content?('Video Topics')
end
- test "should not see More videos on topics with link under video" do
+ test "should not see More videos on topics with link under video", :clips_show do
visit(kinney.clip_path(kinney_clips(:tolson_roots)))
assert page.has_no_content?('More videos on Roots')
end
end
\ No newline at end of file