Files
fizzy/test/controllers/landings_controller_test.rb
T

21 lines
522 B
Ruby

require "test_helper"
class LandingsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "redirects to the timeline when many collections" do
get landing_path
assert_redirected_to events_path
end
test "redirects to collections when only one collection" do
sole_collection, *collections_to_delete = users(:kevin).collections.to_a
collections_to_delete.each(&:destroy)
get landing_path
assert_redirected_to collection_path(sole_collection)
end
end