Skip to content

Commit

Permalink
add basic calendar test
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanVanVugt committed Aug 3, 2023
1 parent 50e4cb2 commit dd953ca
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/controllers/events_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@ class EventsControllerTest < ActionController::TestCase
end
end

test 'should render a calendar' do
with_settings(solr_enabled: true) do
Event.stub(:search_and_filter, MockSearch.new(Event.all)) do
get :calendar
assert_response :success
assert_not_empty assigns(:events)
end
end
end

test 'should render a calendar into a JS update command' do
with_settings(solr_enabled: true) do
Event.stub(:search_and_filter, MockSearch.new(Event.all)) do
get :calendar, format: :js
assert_response :success
assert_not_empty assigns(:events)
end
end
end

test 'should get index as json' do
@event.scientific_topic_uris = ['http://edamontology.org/topic_0654']
@event.save!
Expand Down

0 comments on commit dd953ca

Please sign in to comment.