Sha256: 5fb9277aba39a353709e2c4bb54c8067deaa9a3bb0ed5283da3a9aa9676818f5

Contents?: true

Size: 1.16 KB

Versions: 30

Compression:

Stored size: 1.16 KB

Contents

require File.join(File.dirname(__FILE__), '../spec_helper')

describe FbGraph::Application, '.new' do
  it 'should setup all supported attributes' do
    attributes = {
      :id          => '12345',
      :name        => 'FbGraph',
      :description => 'Owsome Facebook Graph Wrapper',
      :category    => 'Programming',
      :link        => 'http://github.com/nov/fb_graph',
      :secret      => 'sec sec'
    }
    app = FbGraph::Application.new(attributes.delete(:id), attributes)
    app.identifier.should  == '12345'
    app.name.should        == 'FbGraph'
    app.description.should == 'Owsome Facebook Graph Wrapper'
    app.category.should    == 'Programming'
    app.link.should        == 'http://github.com/nov/fb_graph'
    app.secret.should      == 'sec sec'
  end
end

describe FbGraph::Application, '.get_access_token' do
  before do
    fake_json :post, 'oauth/access_token', 'token_response'
    @app = FbGraph::Application.new('client_id', :secret => 'client_secret')
  end

  it 'should POST oauth/token' do
    @app.access_token.should be_nil
    @app.get_access_token
    @app.access_token.should == 'token'
  end

  after do
    FakeWeb.clean_registry
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
fb_graph-1.6.9 spec/fb_graph/application_spec.rb
fb_graph-1.7.0.alpha spec/fb_graph/application_spec.rb
fb_graph-1.6.8 spec/fb_graph/application_spec.rb
fb_graph-1.6.7 spec/fb_graph/application_spec.rb
fb_graph-1.6.5 spec/fb_graph/application_spec.rb
fb_graph-1.6.4 spec/fb_graph/application_spec.rb
fb_graph-1.6.3 spec/fb_graph/application_spec.rb
fb_graph-1.6.2 spec/fb_graph/application_spec.rb
fb_graph-1.6.1 spec/fb_graph/application_spec.rb
fb_graph-1.6.0 spec/fb_graph/application_spec.rb
fb_graph-1.5.5 spec/fb_graph/application_spec.rb
fb_graph-1.5.4 spec/fb_graph/application_spec.rb
fb_graph-1.5.3 spec/fb_graph/application_spec.rb
fb_graph-1.5.2 spec/fb_graph/application_spec.rb
fb_graph-1.5.1 spec/fb_graph/application_spec.rb
fb_graph-1.5.0 spec/fb_graph/application_spec.rb
fb_graph-1.4.1 spec/fb_graph/application_spec.rb
fb_graph-1.4.0 spec/fb_graph/application_spec.rb
fb_graph-1.3.9 spec/fb_graph/application_spec.rb
fb_graph-1.3.8 spec/fb_graph/application_spec.rb