cycle method added to auto cycle through tweets and exception handling is modified to capture all errors that raise from twitter
This commit is contained in:
parent
f29a15b8e4
commit
881518f1f3
10 changed files with 73 additions and 56 deletions
|
|
@ -296,8 +296,8 @@ describe Admin::ConferencesController do
|
|||
describe 'GET #conference_wide_screen' do
|
||||
it 'requires organizer privileges' do
|
||||
get :conference_wide_screen, id: conference.short_title,
|
||||
conference: attributes_for(:conference,
|
||||
short_title: 'ExCon')
|
||||
conference: attributes_for(:conference,
|
||||
short_title: 'ExCon')
|
||||
expect(response).to redirect_to(send(path))
|
||||
if message
|
||||
expect(flash[:alert]).to match(/#{message}/)
|
||||
|
|
@ -306,7 +306,6 @@ describe Admin::ConferencesController do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
describe 'participant access' do
|
||||
before(:each) do
|
||||
sign_in(participant)
|
||||
|
|
|
|||
|
|
@ -328,27 +328,26 @@ describe Event do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
describe 'is_current?' do
|
||||
describe 'current?' do
|
||||
let(:past_event) { create(:event, program: conference.program) }
|
||||
let(:future_event) { create(:event, program: conference.program) }
|
||||
|
||||
before do
|
||||
event.update_attributes(start_time: "#{Time.current}")
|
||||
past_event.update_attributes(start_time: "#{Time.current - 2.days}")
|
||||
future_event.update_attributes(start_time: "#{Time.current + 2.days}")
|
||||
event.update_attributes(start_time: Time.current.to_s)
|
||||
past_event.update_attributes(start_time: (Time.current - 2.days).to_s)
|
||||
future_event.update_attributes(start_time: (Time.current + 2.days).to_s)
|
||||
end
|
||||
|
||||
it 'returns false for a completed event' do
|
||||
expect(past_event.is_current?).to be_falsey
|
||||
expect(past_event.current?).to be_falsey
|
||||
end
|
||||
|
||||
it 'returns false for a future event' do
|
||||
expect(future_event.is_current?).to be_falsey
|
||||
expect(future_event.current?).to be_falsey
|
||||
end
|
||||
|
||||
it 'returns true for a current event' do
|
||||
expect(event.is_current?).to be_truthy
|
||||
expect(event.current?).to be_truthy
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue