Merge branch 'main' into everyone
* main: Update this test, too Adjust tests to match new behavior Don't autocomplete Rework boosts form so you can enter any integer
This commit is contained in:
@@ -6,8 +6,20 @@ class BoostsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
test "create" do
|
||||
boost_count = bubbles(:logo).boosts_count
|
||||
|
||||
assert_difference "bubbles(:logo).reload.boosts_count", +1 do
|
||||
post bucket_bubble_boosts_url(buckets(:writebook), bubbles(:logo), format: :turbo_stream)
|
||||
post bucket_bubble_boosts_url(buckets(:writebook), bubbles(:logo), params: { boost_count: boost_count }, format: :turbo_stream)
|
||||
end
|
||||
|
||||
assert_turbo_stream action: :update, target: dom_id(bubbles(:logo), :boosts)
|
||||
end
|
||||
|
||||
test "create with value" do
|
||||
boost_count = 10
|
||||
|
||||
assert_changes "bubbles(:logo).reload.boosts_count", to: boost_count do
|
||||
post bucket_bubble_boosts_url(buckets(:writebook), bubbles(:logo), params: { boost_count: boost_count }, format: :turbo_stream)
|
||||
end
|
||||
|
||||
assert_turbo_stream action: :update, target: dom_id(bubbles(:logo), :boosts)
|
||||
|
||||
Reference in New Issue
Block a user