Fix typo in document management verification tests
This commit is contained in:
@@ -75,43 +75,43 @@ describe Verification::Management::Document do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "Allowed Age" do
|
describe "Allowed Age" do
|
||||||
let(:min_age) { User.minimum_required_age }
|
let(:min_age) { User.minimum_required_age }
|
||||||
let(:over_minium_age_date_of_birth) { Date.new((min_age + 10).years.ago.year, 12, 31) }
|
let(:over_minimum_age_date_of_birth) { Date.new((min_age + 10).years.ago.year, 12, 31) }
|
||||||
let(:under_minium_age_date_of_birth) { Date.new(min_age.years.ago.year, 12, 31) }
|
let(:under_minimum_age_date_of_birth) { Date.new(min_age.years.ago.year, 12, 31) }
|
||||||
let(:just_minium_age_date_of_birth) do
|
let(:just_minimum_age_date_of_birth) do
|
||||||
Date.new(min_age.years.ago.year, min_age.years.ago.month, min_age.years.ago.day)
|
Date.new(min_age.years.ago.year, min_age.years.ago.month, min_age.years.ago.day)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#valid_age?" do
|
describe "#valid_age?" do
|
||||||
it "returns false when the user is younger than the user's minimum required age" do
|
it "returns false when the user is younger than the user's minimum required age" do
|
||||||
census_response = double(date_of_birth: under_minium_age_date_of_birth)
|
census_response = double(date_of_birth: under_minimum_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.valid_age?(census_response)).to be false
|
expect(Verification::Management::Document.new.valid_age?(census_response)).to be false
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns true when the user has the user's minimum required age" do
|
it "returns true when the user has the user's minimum required age" do
|
||||||
census_response = double(date_of_birth: just_minium_age_date_of_birth)
|
census_response = double(date_of_birth: just_minimum_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
|
expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns true when the user is older than the user's minimum required age" do
|
it "returns true when the user is older than the user's minimum required age" do
|
||||||
census_response = double(date_of_birth: over_minium_age_date_of_birth)
|
census_response = double(date_of_birth: over_minimum_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
|
expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#under_age?" do
|
describe "#under_age?" do
|
||||||
it "returns true when the user is younger than the user's minimum required age" do
|
it "returns true when the user is younger than the user's minimum required age" do
|
||||||
census_response = double(date_of_birth: under_minium_age_date_of_birth)
|
census_response = double(date_of_birth: under_minimum_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.under_age?(census_response)).to be true
|
expect(Verification::Management::Document.new.under_age?(census_response)).to be true
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns false when the user is user's minimum required age" do
|
it "returns false when the user is user's minimum required age" do
|
||||||
census_response = double(date_of_birth: just_minium_age_date_of_birth)
|
census_response = double(date_of_birth: just_minimum_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.under_age?(census_response)).to be false
|
expect(Verification::Management::Document.new.under_age?(census_response)).to be false
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns false when the user is older than user's minimum required age" do
|
it "returns false when the user is older than user's minimum required age" do
|
||||||
census_response = double(date_of_birth: over_minium_age_date_of_birth)
|
census_response = double(date_of_birth: over_minimum_age_date_of_birth)
|
||||||
expect(Verification::Management::Document.new.under_age?(census_response)).to be false
|
expect(Verification::Management::Document.new.under_age?(census_response)).to be false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user