bitpay-rails 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/bit_pay_client.rb +11 -4
- data/lib/bit_pay_rails/version.rb +1 -1
- data/test/dummy/log/test.log +552 -1699
- data/test/models/bit_pay_client_test.rb +5 -0
- data/test/test_helper.rb +2 -0
- metadata +15 -5
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -13
@@ -63,6 +63,11 @@ class BitPayClientTest < ActiveSupport::TestCase
|
|
63
63
|
params = {invoice_id: 'invoiceid', request_id: 'refundid', ignored: 'ignoreme'}
|
64
64
|
@client.cancel_refund(params)
|
65
65
|
end
|
66
|
+
|
67
|
+
test 'client calls bitpay client to get tokens' do
|
68
|
+
allow(@mock_client).to receive(:get).with(path: 'tokens').and_return({"data"=>[{"merchant"=>"CYBkxSyJjRVzyAJbi9uhrPiGvx7buiZzydJhSfGnKf2u"}]})
|
69
|
+
assert_equal(@client.get_tokens, [{"merchant"=>"CYBkxSyJjRVzyAJbi9uhrPiGvx7buiZzydJhSfGnKf2u"}])
|
70
|
+
end
|
66
71
|
end
|
67
72
|
|
68
73
|
class ClientLogTest < ActiveSupport::TestCase
|
data/test/test_helper.rb
CHANGED
@@ -3,6 +3,8 @@ ENV["RAILS_ENV"] = "test"
|
|
3
3
|
ENV["BPSECRET"] = "1234568675757575752012459"
|
4
4
|
ENV["BPSALT"] = "iamtheeggman"
|
5
5
|
|
6
|
+
require 'coveralls'
|
7
|
+
Coveralls.wear!('rails')
|
6
8
|
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
7
9
|
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
8
10
|
require "rails/test_help"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitpay-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BitPay, Inc.
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
description: Basic connector to the BitPay cryptographic API
|
112
126
|
email:
|
113
127
|
- integrations@bitpay.com
|
@@ -156,10 +170,8 @@ files:
|
|
156
170
|
- test/dummy/config/locales/en.yml
|
157
171
|
- test/dummy/config/routes.rb
|
158
172
|
- test/dummy/config/secrets.yml
|
159
|
-
- test/dummy/db/development.sqlite3
|
160
173
|
- test/dummy/db/schema.rb
|
161
174
|
- test/dummy/db/test.sqlite3
|
162
|
-
- test/dummy/log/development.log
|
163
175
|
- test/dummy/log/test.log
|
164
176
|
- test/dummy/public/404.html
|
165
177
|
- test/dummy/public/422.html
|
@@ -222,10 +234,8 @@ test_files:
|
|
222
234
|
- test/dummy/config/routes.rb
|
223
235
|
- test/dummy/config/secrets.yml
|
224
236
|
- test/dummy/config.ru
|
225
|
-
- test/dummy/db/development.sqlite3
|
226
237
|
- test/dummy/db/schema.rb
|
227
238
|
- test/dummy/db/test.sqlite3
|
228
|
-
- test/dummy/log/development.log
|
229
239
|
- test/dummy/log/test.log
|
230
240
|
- test/dummy/public/404.html
|
231
241
|
- test/dummy/public/422.html
|
Binary file
|
@@ -1,13 +0,0 @@
|
|
1
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
-
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
-
[1m[36m (0.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6
|
-
Migrating to BitPayRailsClient (20150427150251)
|
7
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
8
|
-
Migrating to BitPayRailsClient (20150427150251)
|
9
|
-
[1m[35m (0.1ms)[0m begin transaction
|
10
|
-
[1m[36m (0.4ms)[0m [1mCREATE TABLE "bit_pay_clients" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "api_uri" varchar, "pem" varchar, "facade" varchar DEFAULT 'merchant', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
11
|
-
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150427150251"]]
|
12
|
-
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
13
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|