Sha256: 95357f943b27a500dc2bb117994d8423140dd5418dc51154c29c5bfb1398e2c0

Contents?: true

Size: 836 Bytes

Versions: 1

Compression:

Stored size: 836 Bytes

Contents

require 'spec_helper'

require 'rails_app/app/mailers/sorcery_mailer'
require 'shared_examples/user_shared_examples'

describe "User with no submodules (core)" do
  before(:all) do
    sorcery_reload!
  end

  describe User, "when app has plugin loaded" do
    it "User should respond_to .authenticates_with_sorcery!" do
      User.should respond_to(:authenticates_with_sorcery!)
    end
  end

  # ----------------- PLUGIN CONFIGURATION -----------------------

  it_should_behave_like "rails_3_core_model"

  describe User, "external users" do

    it_should_behave_like "external_user"

  end

  describe User, "when inherited" do
    it "should inherit mongoid fields" do
      User.class_eval do
        field :blabla
      end
      class SubUser < User
      end

      SubUser.fields.should include("blabla")
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sorcery-0.8.5 spec/mongoid/user_spec.rb