Sha256: 3f0498df011f32fc9d681abd7fb909818a08443ca6f50461d29bc77c204cb5d2
Contents?: true
Size: 950 Bytes
Versions: 1
Compression:
Stored size: 950 Bytes
Contents
require 'spec_base' require 'spec_rails' describe AktionTestRails::Support::ActiveAdmin::Request::SignIn do include described_class before(:each) do unless FactoryGirl.factories.registered?(:admin_user) FactoryGirl.define do factory :admin_user do sequence(:email) {|n| "admin-#{n}@example.com"} password 'password' password_confirmation 'password' end end end end it "should create and sign in an admin user" do sign_in_active_admin page.should have_content "Signed in successfully." current_path.should == '/admin' end it "should create an admin user" do expect { sign_in_active_admin }.to change { AdminUser.count }.by 1 @admin.should be_a AdminUser end it "should not create an admin user if it already exists" do @admin = FactoryGirl.create(:admin_user) expect { sign_in_active_admin }.to_not change { AdminUser.count } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aktion_test_rails-0.2.0 | spec/requests/active_admin/sign_in_spec.rb |