From 345acb1c0b88a0e3e99d03181bd488283a6ebfce Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Tue, 14 Jan 2025 14:38:46 +0000 Subject: [PATCH] Add test for readings controller --- test/controllers/readings_controller_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/controllers/readings_controller_test.rb diff --git a/test/controllers/readings_controller_test.rb b/test/controllers/readings_controller_test.rb new file mode 100644 index 000000000..bb173b4a2 --- /dev/null +++ b/test/controllers/readings_controller_test.rb @@ -0,0 +1,15 @@ +require "test_helper" + +class ReadingsControllerTest < ActionDispatch::IntegrationTest + setup do + sign_in_as :kevin + end + + test "index" do + assert_changes -> { notifications(:logo_created_kevin).reload.read? }, from: false, to: true do + post bucket_bubble_readings_url(bubbles(:logo).bucket, bubbles(:logo)), as: :turbo_stream + end + + assert_response :success + end +end