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:
Jose Farias
2024-12-16 11:19:36 -06:00
6 changed files with 51 additions and 30 deletions
+13 -1
View File
@@ -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)