|
@ -17,13 +17,15 @@ describe "Index Page" do |
|
|
page.should have_button 'CHECK OUT' |
|
|
page.should have_button 'CHECK OUT' |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
it 'clicking check in should check in a user' do |
|
|
it 'clicking check in should check in a user', js: true do |
|
|
|
|
|
pending |
|
|
expect{click_button 'CHECK IN'}. |
|
|
expect{click_button 'CHECK IN'}. |
|
|
to change{@user.checked_in?}. |
|
|
to change{@user.checked_in?}. |
|
|
from(false).to(true) |
|
|
from(false).to(true) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
it 'clicking check out should check out a user' do |
|
|
it 'clicking check out should check out a user', js: true do |
|
|
|
|
|
pending |
|
|
@user.checkin |
|
|
@user.checkin |
|
|
expect{click_button 'CHECK OUT'}. |
|
|
expect{click_button 'CHECK OUT'}. |
|
|
to change{@user.checked_in?}. |
|
|
to change{@user.checked_in?}. |
|
|