Skip to content

Instantly share code, notes, and snippets.

@sarony
Last active August 29, 2015 14:05
Show Gist options
  • Save sarony/6af8449eecd039f032de to your computer and use it in GitHub Desktop.
Save sarony/6af8449eecd039f032de to your computer and use it in GitHub Desktop.
require 'spec_helper'
feature "Super admin can invite admin" do
scenario "from admin panel" do
visit admin_panel_path
expect(page).to have_content("Invite Admin")
click_link("Invite Admin")
expect(current_path).to eq(invite_admin_path)
fill_in("Email Address", with: "[email protected]")
fill_in("Name", with: "Uzo")
click_button("Send Invite")
expect(current_path).to eq(admin_panel_path)
expect(page).to have_content("Invite successfully sent")
expect(page).to have_content("Uzo")
expect(page).to have_content("waiting for reply")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment