Sha256: d57b3f5d7467090eaa4c806c186a506345c4b7b9fb9b5b34f184132e93136a81

Contents?: true

Size: 604 Bytes

Versions: 2

Compression:

Stored size: 604 Bytes

Contents

# encoding: utf-8
require "spec_helper"

describe Vkontakte::App::User do
  it "should be valid" do
    Vkontakte::App::User.should be_a(Module)
  end

  context "fetch" do
    before(:each) do
      @user = Vkontakte::App::User.new('uid', :access_token => 'ACCESS_TOKEN')
    end

    it "should load user profile" do
      FakeWeb.register_uri(:get,
        "https://api.vk.com/method/users.get?v=5.24&access_token=ACCESS_TOKEN&uids=uid",
        :body => '{"response":[{"uid":2592709, "last_name":"Галета", "first_name":"Павел"}]}')

      @user.fetch.should_not be_blank
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vkontakte-0.0.8 spec/apps/user_spec.rb
vkontakte-0.0.7 spec/apps/user_spec.rb