Sha256: cdd2cec13d0c6f72dac561675309c5390ed5088036f65e0737c6e6b795795668
Contents?: true
Size: 932 Bytes
Versions: 3
Compression:
Stored size: 932 Bytes
Contents
require 'spec_helper' describe VkontakteApi::Error do before(:each) do @e = VkontakteApi::Error.new( :error_code => 5, :error_msg => 'User authorization failed: invalid access_token.', :request_params => [ { :key => 'oauth', :value => '1' }, { :key => 'method', :value => 'unknownMethod' }, { :key => 'some', :value => 'params' }, { :key => 'access_token', :value => '123' } ] ) end describe "#message" do it "returns all needed data about an error" do message = 'VKontakte returned an error 5: \'User authorization failed: invalid access_token.\' after calling method \'unknownMethod\' with parameters {"some"=>"params"}.' expect { raise @e }.to raise_error(@e.class, message) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vkontakte_api-0.2.1 | spec/vkontakte_api/error_spec.rb |
vkontakte_api-0.2 | spec/vkontakte_api/error_spec.rb |
vkontakte_api-0.1 | spec/vkontakte_api/error_spec.rb |