Skip to content

Instantly share code, notes, and snippets.

@daveworth
Created October 4, 2011 12:58
Show Gist options
  • Save daveworth/1261584 to your computer and use it in GitHub Desktop.
Save daveworth/1261584 to your computer and use it in GitHub Desktop.
#defines login_as
require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
describe "MC Integration" do
describe "setup modal" do
# would want a
# before(:each) do
# login_as(:owner)
# visit root_path
# click_link "toggleMenu"
# click_link "MailChimp Setup"
# end
#
# and
#
# after(:each) do
# logout
# end
it "opens after menu click" do
login_as(:owner) do
visit root_path
click_link "toggleMenu"
click_link "MailChimp Setup"
page.should have_content("MailChimp is an email marketing service for small businesses")
end
end
it "closes after clicking cancel" do
login_as(:owner) do
visit root_path
click_link "toggleMenu"
click_link "MailChimp Setup"
find("form#mailchimpForm ul.saveCancel a#cancelButton").click
page.should have_no_content("MailChimp is an email marketing service for small businesses")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment