Sha256: d05754840ebc07915902f3ac05e12256f435606fd85a5bf8dc6524968373c347

Contents?: true

Size: 672 Bytes

Versions: 3

Compression:

Stored size: 672 Bytes

Contents

require 'rails_helper'

RSpec.describe Sso::Client, :type => :model do
  describe "associations" do
    it { is_expected.to belong_to(:session).class_name('Sso::Session').with_foreign_key(:sso_session_id) }
    it { is_expected.to belong_to(:application).class_name('Doorkeeper::Application') }
    it { is_expected.to belong_to(:access_grant).class_name('Doorkeeper::AccessGrant') }
    it { is_expected.to belong_to(:access_token).class_name('Doorkeeper::AccessToken') }
  end

  describe "validations" do
    it { is_expected.to validate_uniqueness_of(:access_grant_id).allow_nil }
    it { is_expected.to validate_uniqueness_of(:access_token_id).allow_nil }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
doorkeeper_sso-0.2.3 spec/models/sso/client_spec.rb
doorkeeper_sso-0.2.2 spec/models/sso/client_spec.rb
doorkeeper_sso-0.2.0 spec/models/sso/client_spec.rb