Created
October 9, 2014 19:01
-
-
Save machty/cbd419b14ad7497e0ace to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test("customers can use a forgot password link", function() { | |
ajax('/setup_test_env/signup/preexisting-users').then(function() { | |
visit(...); | |
fillIn(...); | |
click(...); | |
andThen(function() { | |
equal(find('.errors p').text(), "E-mail taken"); | |
}); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "states" do | |
before do | |
# create any global state shared with any states defined below | |
end | |
context "signup" do | |
context "preexisting-users" do | |
before do | |
FactoryGirl.create(:customer) | |
end | |
it "sets up expected environment" do | |
# This is only used on the rails side to validate that | |
# the expected database/server state has been established | |
# so that when the JS suite requests this state to be set up, | |
# everything will be set up as expected. | |
# But actually providing an `it` rails test for | |
# each nested describe/context/context etc environment/state | |
# is optional | |
expect(Customer.count).to eq(1) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment