Name order attributes similar to other text

Rails' auto-generated names used in error messages were a bit cryptic
for users.
This commit is contained in:
Maikel Linke
2023-01-25 14:48:36 +11:00
parent ab7e1ac39f
commit cec9d2987e
4 changed files with 21 additions and 5 deletions

View File

@@ -86,7 +86,7 @@ describe SplitCheckoutController, type: :controller do
put :update, params: params
expect(response.status).to eq 422
expect(flash[:error]).to eq "Saving failed, please update the highlighted fields."
expect(flash[:error]).to match "Saving failed, please update the highlighted fields."
expect(order.reload.state).to eq "cart"
end
end
@@ -161,7 +161,7 @@ describe SplitCheckoutController, type: :controller do
put :update, params: params
expect(response.status).to eq 422
expect(flash[:error]).to eq "Saving failed, please update the highlighted fields."
expect(flash[:error]).to match "Saving failed, please update the highlighted fields."
expect(order.reload.state).to eq "payment"
end
end
@@ -271,7 +271,7 @@ describe SplitCheckoutController, type: :controller do
put :update, params: params
expect(response.status).to eq 422
expect(flash[:error]).to eq "Saving failed, please update the highlighted fields."
expect(flash[:error]).to match "Saving failed, please update the highlighted fields."
expect(order.reload.state).to eq "confirmation"
end
end