Skip to content

Commit

Permalink
[ARP-86023] ARP IPF: Lint fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
nihil2501 committed Sep 6, 2024
1 parent 3a3cf9e commit 0e57a6b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
end

after(:create) do |user, evaluator|
create(:in_progress_form, {
form_id: evaluator.in_progress_form_id,
return_url: evaluator.in_progress_form_return_url,
user_account: user.user_account,
user_uuid: user.uuid
})
create(
:in_progress_form,
{
form_id: evaluator.in_progress_form_id,
return_url: evaluator.in_progress_form_return_url,
user_account: user.user_account,
user_uuid: user.uuid
}
)
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,60 @@
in_progress_form_return_url = Faker::Internet.url

let(:user) do
create(:representative_user, :with_in_progress_form, {
first_name:, last_name:, sign_in_service_name:,
in_progress_form_id:, in_progress_form_return_url:
})
create(
:representative_user,
:with_in_progress_form,
{
first_name:, last_name:, sign_in_service_name:,
in_progress_form_id:, in_progress_form_return_url:
}
)
end

it 'responds with the user and their in progress form' do
get '/accredited_representative_portal/v0/user'

expect(response).to have_http_status(:ok)
expect(parsed_response).to eq({
"account" => {
"account_uuid" => user.user_account.id
},
"profile" => {
"first_name" => first_name,
"last_name" => last_name,
"verified" => true,
"sign_in" => {
"service_name" => sign_in_service_name
}
},
"prefills_available" => [],
"in_progress_forms" => [
{
"form" => in_progress_form_id,
"metadata" => {
"version" => 1,
"return_url" => in_progress_form_return_url,
"submission" => {
"status" => false,
"error_message" => false,
"id" => false,
"timestamp" => false,
"has_attempted_submit" => false
expect(parsed_response).to eq(
{
'account' => {
'account_uuid' => user.user_account.id
},
'profile' => {
'first_name' => first_name,
'last_name' => last_name,
'verified' => true,
'sign_in' => {
'service_name' => sign_in_service_name
}
},
'prefills_available' => [],
'in_progress_forms' => [
{
'form' => in_progress_form_id,
'metadata' => {
'version' => 1,
'return_url' => in_progress_form_return_url,
'submission' => {
'status' => false,
'error_message' => false,
'id' => false,
'timestamp' => false,
'has_attempted_submit' => false
},
'createdAt' => Time.current.to_i,
'expiresAt' => 60.days.from_now.to_i,
'lastUpdated' => Time.current.to_i,
'inProgressFormId' => InProgressForm.find_by(
form_id: in_progress_form_id,
user_account_id: user.user_account.id
).id
},
"createdAt" => Time.current.to_i,
"expiresAt" => 60.days.from_now.to_i,
"lastUpdated" => Time.current.to_i,
"inProgressFormId" => InProgressForm.find_by(
form_id: in_progress_form_id,
user_account_id: user.user_account.id
).id
},
"lastUpdated" => Time.current.to_i
}
]
})
'lastUpdated' => Time.current.to_i
}
]
}
)
end
end
end
Expand Down

0 comments on commit 0e57a6b

Please sign in to comment.