Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
require "rails_helper"
|
|
|
|
|
|
|
|
RSpec.describe ErrorSummaryFullMessagesPresenter do
|
|
|
|
subject(:error_summary_presenter) { described_class.new(error_messages) }
|
|
|
|
|
|
|
|
let(:error_messages) { { reset_password_token: %w[expired] } }
|
|
|
|
let(:formatted_error_messages) { [[:reset_password_token, "Reset password token expired"]] }
|
|
|
|
|
|
|
|
it "formats messages to include the attribute name" do
|
|
|
|
expect(error_summary_presenter.formatted_error_messages).to eq(formatted_error_messages)
|
|
|
|
end
|
|
|
|
end
|