Sha256: 86ebe3239e26718a4b284f76ca449c2ffa202ca24c6461e3151d48803ba0cadf

Contents?: true

Size: 681 Bytes

Versions: 18

Compression:

Stored size: 681 Bytes

Contents

require 'spec_helper'
require 'active_support/core_ext/module/delegation'
require 'doorkeeper/oauth/scopes'
require 'doorkeeper/models/scopes'

describe 'Doorkeeper::Models::Scopes' do
  subject do
    Class.new(Hash) do
      include Doorkeeper::Models::Scopes
    end.new
  end

  before do
    subject[:scopes] = 'public admin'
  end

  describe :scopes do
    it 'is a `Scopes` class' do
      subject.scopes.should be_a(Doorkeeper::OAuth::Scopes)
    end

    it 'includes scopes' do
      subject.scopes.should include(:public)
    end
  end

  describe :scopes_string do
    it 'is a `Scopes` class' do
      subject.scopes_string.should == 'public admin'
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
doorkeeper-0.7.3 spec/lib/models/scopes_spec.rb
doorkeeper-0.7.2 spec/lib/models/scopes_spec.rb
doorkeeper-0.7.1 spec/lib/models/scopes_spec.rb
doorkeeper-0.7.0 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.7 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.6 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.5 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.4 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.3 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.2 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.1 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.0 spec/lib/models/scopes_spec.rb
doorkeeper-0.6.0.rc1 spec/lib/models/scopes_spec.rb
doorkeeper-0.5.0 spec/lib/models/scopes_spec.rb
doorkeeper-0.5.0.rc1 spec/lib/models/scopes_spec.rb
doorkeeper-0.4.2 spec/lib/models/scopes_spec.rb
doorkeeper-0.4.1 spec/lib/models/scopes_spec.rb
doorkeeper-0.4.0 spec/lib/models/scopes_spec.rb