Commit 14ccbf2f by vulehuan

rspec: card - step 2: click continue with invalid infos - email address format

parent 9cf0d7e8
...@@ -207,6 +207,14 @@ describe "CardPages" do ...@@ -207,6 +207,14 @@ describe "CardPages" do
end end
describe "when email is not valid" do describe "when email is not valid" do
before do
visit url_for(controller: 'cards', action: 'checkout')
fill_in_order_form()
fill_in "Email", with: "abc"
click_button "Continue"
end
it { should have_selector('.alert.alert-error', text: 'Invalid email address') }
end end
describe "when phone is not present" do describe "when phone is not present" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment