Created
May 17, 2016 00:26
-
-
Save mfifth/a224d2434b3de584424940663b1e0b83 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
require 'rails_helper' | |
RSpec.describe "Administrators can create posts and enable user privileges" do | |
let(:admin) { FactoryGirl.create(:user, :admin) } | |
before do | |
login_as(admin) | |
visit '/' | |
end | |
scenario 'successfully inside the index page from admin lounge' do | |
click_link 'Admin' | |
click_link "New User" | |
fill_in "Email", with: "[email protected]" | |
fill_in "Password", with: "password" | |
click_button "Create User" | |
expect(page).to have_content 'New user has been created.' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment