Skip to content

Commit 7a43324

Browse files
Revert "Updated test to no longer expect create to use turbo, forgot to set http status"
This reverts commit 0204a22.
1 parent afe6322 commit 7a43324

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/controllers/distributions_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class DistributionsController < ApplicationController
77
include DateRangeHelper
88
include DistributionHelper
99

10-
# before_action :enable_turbo!, only: %i[show]
10+
before_action :enable_turbo!, only: %i[show]
1111
skip_before_action :authenticate_user!, only: %i(calendar)
1212
skip_before_action :authorize_user, only: %i(calendar)
1313

@@ -129,7 +129,7 @@ def create
129129

130130
flash_error = insufficient_error_message(result.error.message)
131131
flash.now[:error] = flash_error
132-
render :new, status: :bad_request
132+
render :new
133133
end
134134
end
135135

spec/controllers/distributions_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
}
220220
}
221221
end
222-
subject { post :create, params: params }
222+
subject { post :create, params: params.merge(format: :turbo_stream) }
223223

224224
it "flashes an error" do
225225
expect(subject).to have_http_status(:bad_request)

0 commit comments

Comments
 (0)