Skip to content

Commit 7694ade

Browse files
authored
Merge pull request #1975 from basecamp/flavorjones/fix-webhook-view
Pass correct params to webhook reactivation url helper.
2 parents 00db048 + 69f8216 commit 7694ade

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

app/views/webhooks/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</header>
2323
<% unless @webhook.active? %>
2424
<div>
25-
<%= button_to "Reactivate", board_webhook_activation_path(@webhook), method: :post %>
25+
<%= button_to "Reactivate", board_webhook_activation_path(@webhook.board_id, @webhook), method: :post %>
2626
</div>
2727
<% end %>
2828

test/controllers/webhooks_controller_test.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ class WebhooksControllerTest < ActionDispatch::IntegrationTest
1414
webhook = webhooks(:active)
1515
get board_webhook_path(webhook.board, webhook)
1616
assert_response :success
17+
18+
webhook = webhooks(:inactive)
19+
get board_webhook_path(webhook.board, webhook)
20+
assert_response :success
1721
end
1822

1923
test "new" do
@@ -63,6 +67,11 @@ class WebhooksControllerTest < ActionDispatch::IntegrationTest
6367
get edit_board_webhook_path(webhook.board, webhook)
6468
assert_response :success
6569
assert_select "form"
70+
71+
webhook = webhooks(:inactive)
72+
get edit_board_webhook_path(webhook.board, webhook)
73+
assert_response :success
74+
assert_select "form"
6675
end
6776

6877
test "update with valid params" do

0 commit comments

Comments
 (0)