Sha256: 1ed2f9940299cb2bd727f3ed0eed754f7876cc6bad7acf4a00045c1655b77cf2
Contents?: true
Size: 1.37 KB
Versions: 3
Compression:
Stored size: 1.37 KB
Contents
require 'spec_helper' feature 'View overrides' do scenario 'when user is not admin active_if toggles overrides off' do login User.create!(admin: false) 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 login 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 controllers in feature' do login User.create!(admin: false) visit '/chili/social_feature/likes' #expect { visit('/chili/social_feature/likes') }.to raise_error(ActionController::RoutingError) end scenario 'when admin active_if makes controllers available' do login User.create!(admin: true) visit '/chili/social_feature/likes' page.should have_content('Your Likes') end end feature 'Multiple chili features' do scenario 'multiple overrides do not redefine each other' do login User.create!(admin: true) visit '/posts' page.should have_content('Like functionality is in beta') page.should have_content('Invite functionality is also in beta') end scenario 'Chili works alongside permanent spree overrides' do visit '/posts' page.should have_content('Permanent spree override') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
chili-4.0.1 | spec/features/social_feature_spec.rb |
chili-4.0.0 | spec/features/social_feature_spec.rb |
chili-3.1.1 | spec/features/social_feature_spec.rb |