From f19241b72ed17e5a53de2824f1503461ef11d222 Mon Sep 17 00:00:00 2001 From: Nicolae Claudius Date: Thu, 19 Sep 2013 23:19:25 +0300 Subject: [PATCH] admin default not active test --- spec/factories.rb | 5 ++++- spec/models/admin_spec.rb | 6 +++++- spec/support/shared_context/data.rb | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/spec/factories.rb b/spec/factories.rb index 3e82754..9ebba5f 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -40,10 +40,13 @@ FactoryGirl.define do end factory :admin do + email + password + password_confirmation {password} end factory :blacklisted_domain do name {FactoryGirl.generate(:domain_name)} end -end \ No newline at end of file +end diff --git a/spec/models/admin_spec.rb b/spec/models/admin_spec.rb index ccc4624..7966ea6 100644 --- a/spec/models/admin_spec.rb +++ b/spec/models/admin_spec.rb @@ -1,5 +1,9 @@ require 'spec_helper' describe Admin do - pending "add some examples to (or delete) #{__FILE__}" + include_context "data" + + it "is inactive by default", focus: true do + admin.should_not be_active + end end diff --git a/spec/support/shared_context/data.rb b/spec/support/shared_context/data.rb index d209655..52d3850 100644 --- a/spec/support/shared_context/data.rb +++ b/spec/support/shared_context/data.rb @@ -33,5 +33,7 @@ shared_context "data" do let(:permission3){create(:permission, :domain => domain3, :user => user)} let(:blacklisted_domain){create(:blacklisted_domain)} + + let(:admin){create(:admin)} end