Sha256: 14bf06af2234fa8574cc10ace8ff50181986e0ad414bbf0694e7aa8e39c97ff0

Contents?: true

Size: 760 Bytes

Versions: 2

Compression:

Stored size: 760 Bytes

Contents

require 'spec_helper'

class TestUserModel
    include Adauth::Rails::ModelBridge
    
    attr_accessor :name
    
    AdauthMappings = {
        :name => :name
    }
    
    AdauthSearchField = [:name]
    
    def self.find_by_name(name)
        TestUserModel.new
    end
    
    def save
        return true
    end
end

describe Adauth::Rails::ModelBridge do
      it "should extend", :no_ad => true do
        TestUserModel.should respond_to :create_from_adauth
    end
    
    it "should create the model" do
        default_config
        TestUserModel.create_from_adauth(administrator)
    end
    
    it "should return and create the model" do
        default_config
        TestUserModel.return_and_create_from_adauth(administrator)
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
adauth-2.0.2 spec/adauth_rails_model_bridge_spec.rb
adauth-2.0.1 spec/adauth_rails_model_bridge_spec.rb