Sha256: 71060250450bebbd565092f773a5309bb156fe18dad10adcaa94c7542ba89b97
Contents?: true
Size: 846 Bytes
Versions: 8
Compression:
Stored size: 846 Bytes
Contents
require 'spec_helper' feature 'View overrides' do scenario 'when user is not admin active_if toggles overrides off' do User.create! visit('/posts') page.should_not have_content('See Your Likes') page.should_not have_content('Like functionality is in beta') end scenario 'when admin active_if toggles overrides on' do User.create!(admin: true) visit('/posts') page.should have_content('See Your Likes') end end feature 'Togglable controllers' do scenario 'when user is not admin active_if hides engine controller' do User.create! expect { visit('/chili/social/likes') }.to raise_error(ActionController::RoutingError) end scenario 'when admin active_if toggles overrides on' do User.create!(admin: true) visit('/chili/social/likes') page.should have_content('Your Likes') end end
Version data entries
8 entries across 8 versions & 1 rubygems