Add tests for new controllers
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
require "test_helper"
|
||||
|
||||
class Columns::Cards::Drops::ClosuresControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in_as :kevin
|
||||
end
|
||||
|
||||
test "create" do
|
||||
card = cards(:logo)
|
||||
|
||||
assert_changes -> { card.reload.closed? }, from: false, to: true do
|
||||
post columns_card_drops_closure_path(card), as: :turbo_stream
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
require "test_helper"
|
||||
|
||||
class Columns::Cards::Drops::ColumnsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in_as :kevin
|
||||
end
|
||||
|
||||
test "create" do
|
||||
card = cards(:logo)
|
||||
column = columns(:writebook_in_progress)
|
||||
|
||||
assert_changes -> { card.reload.column }, to: column do
|
||||
post columns_card_drops_column_path(card, column_id: column.id), as: :turbo_stream
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,16 @@
|
||||
require "test_helper"
|
||||
|
||||
class Columns::Cards::Drops::NotNowsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in_as :kevin
|
||||
end
|
||||
|
||||
test "create" do
|
||||
card = cards(:logo)
|
||||
|
||||
assert_changes -> { card.reload.postponed? }, from: false, to: true do
|
||||
post columns_card_drops_not_now_path(card), as: :turbo_stream
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,16 @@
|
||||
require "test_helper"
|
||||
|
||||
class Columns::Cards::Drops::StreamsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in_as :kevin
|
||||
end
|
||||
|
||||
test "create" do
|
||||
card = cards(:text)
|
||||
|
||||
assert_changes -> { card.reload.triaged? }, from: true, to: false do
|
||||
post columns_card_drops_stream_path(card), as: :turbo_stream
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user