Sha256: 559ca9ad2af412f77d70672fdd59b5cea70754220e2c2e9eb053548fccc1a585

Contents?: true

Size: 556 Bytes

Versions: 10

Compression:

Stored size: 556 Bytes

Contents

require 'spec_helper'

describe Site::Client do
  before do
    @user = Factory(:user)

    @client = Site::Client.create name: "Test",
                                  url: "http://test.com",
                                  callback_url: "http://test.com/callback",
                                  author: @user
  end

  it "should allow update to author" do
    Ability.new(@user).should be_able_to(:update, @client)
  end

  it "should not allow update to other" do
    Ability.new(Factory(:user)).should_not be_able_to(:update, @client)
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
social_stream-2.2.2 oauth2_server/spec/models/site/client_authorization_spec.rb
social_stream-oauth2_server-2.2.2 spec/models/site/client_authorization_spec.rb
social_stream-2.2.1 oauth2_server/spec/models/site/client_authorization_spec.rb
social_stream-oauth2_server-2.2.1 spec/models/site/client_authorization_spec.rb
social_stream-2.2.0 oauth2_server/spec/models/site/client_authorization_spec.rb
social_stream-oauth2_server-2.2.0 spec/models/site/client_authorization_spec.rb
social_stream-2.1.1 oauth2_server/spec/models/site/client_authorization_spec.rb
social_stream-oauth2_server-2.1.1 spec/models/site/client_authorization_spec.rb
social_stream-2.1.0 oauth2_server/spec/models/site/client_authorization_spec.rb
social_stream-oauth2_server-2.1.0 spec/models/site/client_authorization_spec.rb