Skip to content

Commit

Permalink
Update room all spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlON committed Jul 23, 2017
1 parent 7efadc8 commit 1f2bd55
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions spec/features/rooms_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,26 @@
end
end

# scenario 'User looks at all rooms' do
# rooms = create_list(:room, 3)
#
# within '.page-wrapper' do
# click_link 'All rooms'
# end
#
# rooms.each do |room|
# expect(page).to have_content room.name
# room.users.each do |user|
# expect(page).to have_content user.name
# end
# end
# end
context 'all' do
let(:user) { create :user }
let!(:rooms) { create_list(:room, 3, :with_activities) }

background do
sign_in user
visit root_path
end

scenario 'User looks at all rooms' do
within '.page-wrapper' do
click_link 'All rooms'
end

rooms.each do |room|
expect(page).to have_content room.name
room.users.each do |user|
expect(page).to have_content user.name
end
end
end
end
end

0 comments on commit 1f2bd55

Please sign in to comment.