<エラー文>
Failures:
1) 職員による自分のアカウント管理 更新 email属性を変更する
Failure/Error: expect (staff_member.email).to eq("test@example.com")
ArgumentError:
bad value for range
# ./spec/requests/staff/my_account_management_spec.rb:21:in `block (3 levels) in <top (required)>'
Finished in 2.61 seconds (files took 7.83 seconds to load)
3 examples, 1 failure
<修正前>
my_account_management_spec.rb
example "email属性を変更する" do
params_hash.merge!(email: "test@example.com")
patch staff_account_url,
params:{id: staff_member.id , staff_member: params_hash}
staff_member.reload
expect (staff_member.email).to eq("test@example.com")
end
<修正後>
my_account_management_spec.rb
example "email属性を変更する" do
params_hash.merge!(email: "test@example.com")
patch staff_account_url,
params:{id: staff_member.id , staff_member: params_hash}
staff_member.reload
expect(staff_member.email).to eq("test@example.com") #ここを変更
end