Skip to content

Instantly share code, notes, and snippets.

@amiel
Created May 20, 2014 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amiel/26d68c69ee47cfb078cc to your computer and use it in GitHub Desktop.
Save amiel/26d68c69ee47cfb078cc to your computer and use it in GitHub Desktop.
spec/features/admin_user_spec.rb
require 'spec_helper'
describe 'Users' do
fixtures :all
let(:user) { admin_users(:amiel) }
before { login_to_admin }
describe '#index' do
it 'renders without fail' do
visit '/admin/users'
expect(page).to have_content('example@carnesmedia.com')
expect(page).to have_content('Example User')
end
end
describe '#show' do
it 'renders without fail' do
visit "/admin/users/#{users(:example).to_param}"
expect(page).to have_content('Example User')
end
end
describe '#new' do
it 'renders without fail' do
visit "/admin/users/new"
expect(page).to have_content('New User')
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment