30 lines
965 B
Ruby
30 lines
965 B
Ruby
require 'spec_helper'
|
|
|
|
describe "Session Detail", :js => true, :type => :feature, :capybara_feature => true do
|
|
|
|
|
|
let(:searcher) { FactoryGirl.create(:user) }
|
|
let(:requested_rsvp_slot) {FactoryGirl.create(:requested_rsvp_slot, user: searcher)}
|
|
|
|
before(:each) do
|
|
SessionInfoComment.delete_all
|
|
Notification.delete_all
|
|
RsvpRequestRsvpSlot.delete_all
|
|
RsvpRequest.delete_all
|
|
RsvpSlot.delete_all
|
|
Invitation.delete_all
|
|
MusicSession.delete_all
|
|
|
|
stub_const("APP_CONFIG", web_config)
|
|
end
|
|
|
|
it "view pending requests" do
|
|
fast_signin(requested_rsvp_slot.music_session.creator, Nav.session_detail(requested_rsvp_slot.music_session))
|
|
|
|
find('h2', text: 'RSVPs')
|
|
find('div.rsvp-help-notice', text: 'You have new RSVPs to review and approve, see details.')
|
|
find('#pendingRSVPs .rsvp-table td', text: searcher.name)
|
|
find("#pendingRSVPs .rsvp-table img[data-instrument-id='#{requested_rsvp_slot.instrument_id}']")
|
|
end
|
|
end
|