Skip to content

Commit

Permalink
Fix tests by adding Respondent.hashed_number in its factory
Browse files Browse the repository at this point in the history
  • Loading branch information
anaPerezGhiglia committed Jul 19, 2024
1 parent d7dce94 commit 68d89f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/support/factory.ex
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@ defmodule Ask.Factory do

respondent_group = insert(:respondent_group)
canonical_phone_number = Ask.Respondent.canonicalize_phone_number(phone_number)

hashed_number = Ask.Respondent.hash_phone_number(phone_number, respondent_group.survey.project.salt)
%Ask.Respondent{
respondent_group: respondent_group,
survey: (respondent_group |> Ask.Repo.preload(:survey)).survey,
phone_number: phone_number,
sanitized_phone_number: canonical_phone_number,
canonical_phone_number: canonical_phone_number
canonical_phone_number: canonical_phone_number,
hashed_number: hashed_number,
}
end

Expand Down

0 comments on commit 68d89f6

Please sign in to comment.