Add spec to instagram pattern

This commit is contained in:
fabricio.albarnaz
2018-10-11 16:30:17 -03:00
parent e87075aed7
commit 48720c835c

View File

@@ -147,6 +147,14 @@ describe Enterprise do
it "sets the enterprise contact to the owner by default" do
enterprise.contact.should eq enterprise.owner
end
context "prevent an wrong instagram link pattern" do
let!(:e) { create(:enterprise, instagram: 'www.instagram.com/my_user') }
it "expects the instagram attribute to be in the correct pattern" do
expect(e.instagram).to eq('@my_user')
end
end
end
describe "preferred_shopfront_taxon_order" do