Skip to content

Commit

Permalink
AP-5349: Update AddDetailsController tests
Browse files Browse the repository at this point in the history
Use strings when sending and ensure parameters are named
the same as in the controller use
  • Loading branch information
colinbruce committed Nov 8, 2024
1 parent 12df82f commit 66c9fb2
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
capital_disregard: {
amount:,
account_name:,
date_received_3i:,
date_received_2i:,
date_received_1i:,
"date_received(3i)": date_received_3i,
"date_received(2i)": date_received_2i,
"date_received(1i)": date_received_1i,
},
continue_button: "Save and continue",
}
Expand Down Expand Up @@ -68,10 +68,9 @@
context "with valid params" do
let(:amount) { 1234 }
let(:account_name) { "Account name" }
let(:date_received) { Date.new(2024, 2, 1) }
let(:date_received_3i) { date_received.day }
let(:date_received_2i) { date_received.month }
let(:date_received_1i) { date_received.year }
let(:date_received_3i) { "1" }
let(:date_received_2i) { "2" }
let(:date_received_1i) { "2024" }

it "redirects to the next page" do
expect(response).to have_http_status(:redirect)
Expand Down

0 comments on commit 66c9fb2

Please sign in to comment.