fixing failed bands tests

This commit is contained in:
Anthony Davis 2014-05-13 07:40:04 -05:00
parent fc35f0ad9d
commit b919f55280
2 changed files with 5 additions and 3 deletions

View File

@ -156,14 +156,16 @@ FactoryGirl.define do
factory :band_with_follower do
after(:create) do |band|
f = FactoryGirl.create(:following, :followable_id => band.id, :followable_type => "JamRuby::Band")
u = FactoryGirl.create(:fan)
f = FactoryGirl.create(:following, :followable_id => band.id,
:followable_type => "JamRuby::Band", :user_id => u.id)
band.followers << f
end
end
end
factory :following, :class => JamRuby::Follow do
user_id FactoryGirl.create(:fan).id
end
factory :join_request, :class => JamRuby::JoinRequest do

View File

@ -198,7 +198,7 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
find('#band-profile-members-link').trigger(:click)
within('#band-profile-members') do
expect(page).to have_selector('h2', text: 'Pending Band Invitations')
expect(page).to have_css("h2 ~ div[user-id=#{friend.id}]")
expect(page).to have_css("h2 ~ div[user-id='#{friend.id}']")
end
end
end