Browse Source

complete testing

pull/1/head
Nicolae Claudius 11 years ago
parent
commit
323ce26a09
  1. 9
      spec/mailers/users/permission_mailer_spec.rb
  2. 2
      spec/models/admin_spec.rb
  3. 3
      spec/support/shared_context/data.rb

9
spec/mailers/users/permission_mailer_spec.rb

@ -1,5 +1,12 @@
require "spec_helper"
describe Users::PermissionMailer do
pending "add some examples to (or delete) #{__FILE__}"
include_context "data"
it "has sends to the right email" do
created_mail = Users::PermissionMailer.created(permission)
created_mail.to.should == [permission.user.email]
destroyed_mail = Users::PermissionMailer.destroyed(permission)
destroyed_mail.to.should == [permission.user.email]
end
end

2
spec/models/admin_spec.rb

@ -4,6 +4,6 @@ describe Admin do
include_context "data"
it "is inactive by default" do
admin.should_not be_active
admin_admin.should_not be_active
end
end

3
spec/support/shared_context/data.rb

@ -34,6 +34,7 @@ shared_context "data" do
let(:blacklisted_domain){create(:blacklisted_domain)}
let(:admin){create(:admin)}
# admin model
let(:admin_admin){create(:admin)}
end

Loading…
Cancel
Save