20 lines
472 B
Ruby
20 lines
472 B
Ruby
require "test_helper"
|
|
|
|
class Webhooks::ActivationsControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
sign_in_as :kevin
|
|
end
|
|
|
|
test "create" do
|
|
webhook = webhooks(:inactive)
|
|
|
|
assert_not webhook.active?
|
|
|
|
assert_changes -> { webhook.reload.active? }, from: false, to: true do
|
|
post collection_webhook_activation_path(webhook.collection, webhook)
|
|
end
|
|
|
|
assert_redirected_to collection_webhook_path(webhook.collection, webhook)
|
|
end
|
|
end
|