From 48720c835cbfd9bec679449cf6c9005de0e4c993 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Thu, 11 Oct 2018 16:30:17 -0300 Subject: [PATCH] Add spec to instagram pattern --- spec/models/enterprise_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/models/enterprise_spec.rb b/spec/models/enterprise_spec.rb index 73cd3e1c5b..28ce82b103 100644 --- a/spec/models/enterprise_spec.rb +++ b/spec/models/enterprise_spec.rb @@ -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