Sha256: b1e5c7d9ae7969a1cbbae82d4a7bb3d15e27ae767babd3f05a405e8e4eaeb12e
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
require 'spec_helper' module Gringotts describe Settings do before(:each) do end it "phone number can NOT be blank for active settings" do @settings = FactoryGirl.build(:bad_phone_number_missing_settings) @settings.valid?.should be_false end it "phone number should not validate when it's a bad number" do @settings = FactoryGirl.build(:bad_phone_number_settings) @settings.valid?.should be_false end it "phone number should validate when it's a good number" do @settings = FactoryGirl.build(:good_us_phone_number_settings) @settings.valid?.should be_true end it "phone number should validate when it's a good INTL number" do @settings = FactoryGirl.build(:good_pe_phone_number_settings) @settings.valid?.should be_true end it "confirmed_at should be blank after editing phone number" do @settings = FactoryGirl.create(:confirmed_settings) @settings.vault.confirmed_at.should_not be_nil @settings.update_attributes!(phone_number: "555-555-5555") @settings.vault.confirmed_at.should be_nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gringotts-0.6.7 | spec/models/gringotts/settings_spec.rb |
gringotts-0.6.5 | spec/models/gringotts/settings_spec.rb |