Sha256: f41c01da63907a88ee41c68d883b0fce8ccda359f6a8a3dd76c2f00a16efe607

Contents?: true

Size: 713 Bytes

Versions: 1

Compression:

Stored size: 713 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

1 entries across 1 versions & 1 rubygems

Version Path
couchkeeper-0.6.7 spec/lib/models/scopes_spec.rb