Skip to content

Commit

Permalink
Add init method bump 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
div committed Sep 10, 2014
1 parent c95eb59 commit 1dbf2ea
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/payture/client/vwapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Payture
class Client
module Vwapi

API_METHODS = %w(Register Update Delete Add Activate Remove GetList Pay Refund PayStatus)
API_METHODS = %w(Register Update Delete Add Activate Remove GetList Pay Refund PayStatus Init)

API_METHODS.each do |method_name|
underscore_method_name = Payture::Helper.convert_to_underscore method_name
Expand Down
2 changes: 1 addition & 1 deletion lib/payture/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Payture
VERSION = "0.0.1"
VERSION = "0.0.2"
end
37 changes: 37 additions & 0 deletions test/cassettes/init/existing_user.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions test/payture/client/vwapi_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,5 +256,27 @@ module Payture
end
end
end

describe '.init' do
let(:email) { 'fucker1@dom.com' }
let(:card_id) { "e43544ba-cf4f-4702-85ef-313df89577eb" }
let(:options) {
{
session_type: 'Block',
v_w_user_lgn: email,
v_w_user_psw: 123,
ip: '123.123.122.111',
amount: 1000,
order_id: 'asdfasfafa1234'
}
}
subject { client.init options }

it "returns success status" do
VCR.use_cassette('init/existing_user') do
subject.success.must_equal "True"
end
end
end
end
end

0 comments on commit 1dbf2ea

Please sign in to comment.