c8330a7be8
Instead: - Always let you create drafts when pressing "Add card" - Prevent creations of published cards via API - Prevent publication of cards in all cases when the limit is exceeded
15 lines
420 B
Ruby
15 lines
420 B
Ruby
require "test_helper"
|
|
|
|
class Card::LimitedPublishingTest < ActionDispatch::IntegrationTest
|
|
test "cannot publish cards when card limit exceeded" do
|
|
sign_in_as :mike
|
|
|
|
accounts(:initech).update_column(:cards_count, 1001)
|
|
|
|
post card_publish_path(cards(:unfinished_thoughts), script_name: accounts(:initech).slug)
|
|
|
|
assert_response :forbidden
|
|
assert cards(:unfinished_thoughts).reload.drafted?
|
|
end
|
|
end
|