Sha256: b265bff4454ac264e8bf5c4f76c7c402f889c609e6faee736f6321cac1ac109d
Contents?: true
Size: 1.22 KB
Versions: 11
Compression:
Stored size: 1.22 KB
Contents
# Copyright (c) 2008-2013 Michael Dvorkin and contributors. # # Fat Free CRM is freely distributable under the terms of MIT license. # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ require 'spec_helper' describe "admin/users/destroy" do before do login_and_assign(admin: true) end describe "user got deleted" do before do @user = FactoryGirl.create(:user) @user.destroy assign(:user, @user) end it "blinds up destroyed user partial" do render expect(rendered).to include('slideUp') end end describe "user was not deleted" do before do assign(:user, @user = FactoryGirl.build_stubbed(:user)) end it "should remove confirmation panel" do render expect(rendered).to include(%/crm.flick('#{dom_id(@user, :confirm)}', 'remove');/) end it "should shake user partial" do render expect(rendered).to include(%/$('#user_#{@user.id}').effect('shake'/) end it "should show flash message" do render expect(rendered).to include('flash') expect(rendered).to include(%/crm.flash('warning')/) end end end
Version data entries
11 entries across 11 versions & 2 rubygems