Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Mar 4, 2024
1 parent a487ac4 commit 5ec7465
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def current_theme = 'default'
describe 'open_registrations?' do
it 'returns true when open for registrations' do
allow(Setting).to receive(:[]).with('registrations_mode').and_return('open')
allow(Setting).to receive(:[]).with('registrations_start_hour').and_return(0)
allow(Setting).to receive(:[]).with('registrations_end_hour').and_return(0)
allow(Setting).to receive(:[]).with('registrations_secondary_start_hour').and_return(0)
allow(Setting).to receive(:[]).with('registrations_secondary_end_hour').and_return(0)

expect(helper.open_registrations?).to be true
expect(Setting).to have_received(:[]).with('registrations_mode')
Expand Down

0 comments on commit 5ec7465

Please sign in to comment.