Sha256: 30a64168ce0ffc5343500815323bd1d48beb43e3dacd9f1dd16ac02bab1e1204
Contents?: true
Size: 768 Bytes
Versions: 3
Compression:
Stored size: 768 Bytes
Contents
require 'rails_helper' describe Admin::SettingsController, :type => :controller do before(:each) do activate_authlogic user = FactoryGirl.build(:spud_user) user.super_admin = true SpudUserSession.create(user) end describe 'edit' do it "should respond with success" do get :edit expect(response).to be_success end end describe 'update' do it "should redirect to the settings page with a successful update" do put :update, :spud_user => {:first_name => "Mike"} expect(response).to redirect_to(admin_settings_path) end it "should put a message in the flash notice" do put :update, :spud_user => {:first_name => "Mike"} expect(flash[:notice]).to_not be_blank end end end
Version data entries
3 entries across 3 versions & 1 rubygems