Files
fizzy/test/controllers/public/collections_controller_test.rb
T
Jorge Manrubia a916fe4470 Add tests
2025-06-10 11:18:33 +02:00

24 lines
510 B
Ruby

require "test_helper"
class Public::CollectionsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
collections(:writebook).publish
end
test "show" do
get published_collection_path(collections(:writebook))
assert_response :success
end
test "not found if the collection is not published" do
key = collections(:writebook).publication.key
collections(:writebook).unpublish
get public_collection_path(key)
assert_response :not_found
end
end