From 200541e964743c8b55627c792e0868f615395301 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Sun, 6 Apr 2014 16:59:09 -0400 Subject: [PATCH] update tests --- web/spec/features/recording_landing_spec.rb | 5 ++--- web/spec/features/session_landing_spec.rb | 7 ++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/spec/features/recording_landing_spec.rb b/web/spec/features/recording_landing_spec.rb index a8d30f087..b10aa3a61 100644 --- a/web/spec/features/recording_landing_spec.rb +++ b/web/spec/features/recording_landing_spec.rb @@ -17,13 +17,12 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do let (:claimed_recording) { FactoryGirl.create(:claimed_recording) } it "should render comments" do - pending "weird error" + # pending "weird error" + recording = ClaimedRecording.first comment = "test comment" timestamp = "less than a minute ago" url = "/recordings/#{claimed_recording.id}" - - recording = ClaimedRecording.first visit url fill_in "txtRecordingComment", with: comment diff --git a/web/spec/features/session_landing_spec.rb b/web/spec/features/session_landing_spec.rb index 0e2df3550..2db83c67b 100644 --- a/web/spec/features/session_landing_spec.rb +++ b/web/spec/features/session_landing_spec.rb @@ -14,7 +14,7 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do end it "should render comments" do - pending "weird error" + # pending "weird error" msh = MusicSessionHistory.first comment = "test comment" @@ -22,6 +22,8 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do url = "/sessions/#{msh.id}" visit url + # (1) Test a user creating a comment and ensure it displays. + fill_in "txtSessionComment", with: comment find('#btnPostComment').trigger(:click) @@ -31,6 +33,9 @@ describe "Landing", :js => true, :type => :feature, :capybara_feature => true do # timestamp find('div', text: timestamp) + # (2) Test a user visiting a landing page with an existing comment. + + # re-visit page to reload from database visit url # comment body