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.
@@ -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.1
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
-  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.1ms) select sqlite_version(*)
3
-  (0.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
6
- Migrating to BitPayRailsClient (20150427150251)
7
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
8
- Migrating to BitPayRailsClient (20150427150251)
9
-  (0.1ms) begin transaction
10
-  (0.4ms) CREATE 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) 
11
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150427150251"]]
12
-  (0.5ms) commit transaction
13
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"