Skip to content

Commit

Permalink
Test robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacall committed Apr 24, 2024
1 parent 9cd7e4d commit d32878a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions test/controllers/content_providers_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -536,15 +536,17 @@ class ContentProvidersControllerTest < ActionController::TestCase
test 'should have long masonry' do
with_settings({ site: { content_provider_grid_long: true } }) do
get :index
assert_select '.masonry-brick.media-item', count: 9
assert_select '.masonry-brick.media-item.long', count: 9
assert_response :success
assert_select '.masonry-brick.media-item'
assert_select '.masonry-brick.media-item.long'
end
end

test 'should disable long masonry' do
with_settings({ site: { content_provider_grid_long: false } }) do
get :index
assert_select '.masonry-brick.media-item', count: 9
assert_response :success
assert_select '.masonry-brick.media-item'
assert_select '.masonry-brick.media-item.long', count: 0
end
end
Expand Down
4 changes: 3 additions & 1 deletion test/controllers/events_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1489,13 +1489,15 @@ class EventsControllerTest < ActionController::TestCase
test 'should show logo in events' do
with_settings({ site: { show_provider_logo_in_event: true } }) do
get :index
assert_select '.small-avatar', count: 19
assert_response :success
assert_select '.small-avatar'
end
end

test 'should not show logo in events' do
with_settings({ site: { show_provider_logo_in_event: false } }) do
get :index
assert_response :success
assert_select '.small-avatar', count: 0
end
end
Expand Down

0 comments on commit d32878a

Please sign in to comment.