action_smser 3.1.2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,8 +45,9 @@ class ActionSmser::DeliveryReportsControllerTest < ActionController::TestCase
45
45
 
46
46
  SmsTestSetup.expects(:after_gateway_commit).once.with(){|var| var.is_a?(Array) && var.first.is_a?(ActionSmser::DeliveryReport)}
47
47
 
48
- get 'gateway_commit', :gateway => 'test_gateway',
49
- "DeliveryReport"=>{"message"=>{"id"=>@msg_id, "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}
48
+ get 'gateway_commit', params: {:gateway => 'test_gateway',
49
+ "DeliveryReport" => {"message" => {"id" => @msg_id, "donedate" => "2012/01/03 14:20:45",
50
+ "sentdate" => "2012/01/03 14:20:40", "status" => "DELIVERED"}}}
50
51
 
51
52
 
52
53
  assert_response :success
@@ -63,10 +64,10 @@ class ActionSmser::DeliveryReportsControllerTest < ActionController::TestCase
63
64
 
64
65
  ActionSmser.delivery_options[:gateway_commit] = {'test_gateway' => SmsTestSetup}
65
66
 
66
- get 'gateway_commit', :gateway => 'test_gateway',
67
- "DeliveryReport"=>
68
- {"message"=>[{"id"=>@msg_id.to_s, "status"=>"DELIVERED"},
69
- {"id"=>@msg_id2, "status"=>"DELIVERED"}]}
67
+ get 'gateway_commit', params: {:gateway => 'test_gateway',
68
+ "DeliveryReport" =>
69
+ {"message" => [{"id" => @msg_id.to_s, "status" => "DELIVERED"},
70
+ {"id" => @msg_id2, "status" => "DELIVERED"}]}}
70
71
 
71
72
  assert_response :success
72
73
  assert @response.body.downcase.include?("update"), "should have responded about saving"
@@ -81,16 +82,18 @@ class ActionSmser::DeliveryReportsControllerTest < ActionController::TestCase
81
82
  test "gateway_commit without dr" do
82
83
  ActionSmser.delivery_options[:gateway_commit] = {'test_gateway' => SmsTestSetup}
83
84
 
84
- get 'gateway_commit', :gateway => 'test_gateway',
85
- "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}
85
+ get 'gateway_commit', params: {:gateway => 'test_gateway',
86
+ "DeliveryReport" => {"message" => {"id" => "wrongid", "donedate" => "2012/01/03 14:20:45",
87
+ "sentdate" => "2012/01/03 14:20:40", "status" => "DELIVERED"}}}
86
88
 
87
89
  assert_response :success
88
90
  assert @response.body =~ /not/i, "should have responded not saved"
89
91
  end
90
92
 
91
93
  test "gateway_commit without any parser" do
92
- get 'gateway_commit', :gateway => 'gateway_not_found',
93
- "DeliveryReport"=>{"message"=>{"id"=>"wrongid", "donedate"=>"2012/01/03 14:20:45", "sentdate"=>"2012/01/03 14:20:40", "status"=>"DELIVERED"}}
94
+ get 'gateway_commit', params: {:gateway => 'gateway_not_found',
95
+ "DeliveryReport" => {"message" => {"id" => "wrongid", "donedate" => "2012/01/03 14:20:45",
96
+ "sentdate" => "2012/01/03 14:20:40", "status" => "DELIVERED"}}}
94
97
 
95
98
  assert_response :success
96
99
  assert @response.body =~ /not/i, "should have responded not saved"
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ #require 'test_helper'
2
2
 
3
3
  class NavigationTest < ActionDispatch::IntegrationTest
4
4
  fixtures :all
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require 'test_helper'
2
+ require './test/test_helper'
3
3
 
4
4
  class ActionSmser::BaseTest < ActiveSupport::TestCase
5
5
  class MockSms<ActionSmser::Base
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require 'test_helper'
2
+ require './test/test_helper'
3
3
 
4
4
  # We mock delayed_job
5
5
  module Delayed
@@ -37,7 +37,7 @@ class ActionSmser::DelayedJobTest < ActiveSupport::TestCase
37
37
  smsdj = ActionSmser::DeliveryMethods::DelayedJob::SmsDeliverJob.new(@sms, @sms.to_numbers_array.first)
38
38
 
39
39
  [:body, :from, :sms_type, :re_delivery_of_delivery_report_id, :ttl, :delivery_info].each do |var|
40
- assert_equal smsdj.send(var), @sms.send(var)
40
+ assert_equal [var, smsdj.send(var)], [var, @sms.send(var)]
41
41
  end
42
42
 
43
43
  assert smsdj.body.object_id != @sms.body.object_id, "It should make copy of all values, not use the same objects."
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require 'test_helper'
2
+ require './test/test_helper'
3
3
 
4
4
  class ActionSmser::NexmoTest < ActiveSupport::TestCase
5
5
  class MockSms<ActionSmser::Base
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require 'test_helper'
2
+ require './test/test_helper'
3
3
 
4
4
  class ActionSmser::SimpleHttpTest < ActiveSupport::TestCase
5
5
  class MockSms<ActionSmser::Base
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require 'test_helper'
2
+ require './test/test_helper'
3
3
 
4
4
  class ActionSmser::SmstradeTest < ActiveSupport::TestCase
5
5
  class MockSms < ActionSmser::Base
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require 'test_helper'
2
+ require './test/test_helper'
3
3
 
4
4
  class ActionSmser::TestArrayTest < ActiveSupport::TestCase
5
5
  class MockSms<ActionSmser::Base
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require 'test_helper'
2
+ require './test/test_helper'
3
3
 
4
4
  class ActionSmser::DeliveryReportTest < ActiveSupport::TestCase
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_smser
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olli Huotari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-23 00:00:00.000000000 Z
11
+ date: 2018-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '3.2'
26
+ version: '5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mocha
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '3.2'
61
+ version: '5.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '3.2'
68
+ version: '5.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: delayed_job
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rails-controller-testing
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: ActionSmser == SMS && ActionMailer. Simple way to use SMS (Short Message
84
98
  Service) in the same way as ActionMailer. Includes also delivery reports and easy
85
99
  way to add custom gateways (simple http and nexmo by default).
@@ -185,60 +199,60 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
199
  version: '0'
186
200
  requirements: []
187
201
  rubyforge_project:
188
- rubygems_version: 2.4.6
202
+ rubygems_version: 2.6.14
189
203
  signing_key:
190
204
  specification_version: 4
191
205
  summary: ActionSmser == SMS && ActionMailer. Simple way to use SMS (Short Message
192
206
  Service) in the same way as ActionMailer. Includes also delivery reports and easy
193
207
  way to add custom gateways (simple http and nexmo by default).
194
208
  test_files:
195
- - test/unit/action_smser/base_test.rb
196
- - test/unit/action_smser/delivery_methods/test_array_test.rb
197
- - test/unit/action_smser/delivery_methods/delayed_job_test.rb
198
- - test/unit/action_smser/delivery_methods/smstrade_test.rb
199
- - test/unit/action_smser/delivery_methods/nexmo_test.rb
200
- - test/unit/action_smser/delivery_methods/simple_http_test.rb
201
- - test/unit/action_smser/delivery_report_test.rb
202
209
  - test/action_smser_test.rb
210
+ - test/test_helper.rb
211
+ - test/integration/navigation_test.rb
203
212
  - test/functional/action_smser/delivery_reports_controller_test.rb
204
- - test/dummy/app/controllers/application_controller.rb
205
- - test/dummy/app/mailers/hello_smser.rb
206
- - test/dummy/app/helpers/application_helper.rb
207
- - test/dummy/app/assets/javascripts/application.js
208
- - test/dummy/app/assets/stylesheets/application.css
209
- - test/dummy/app/views/layouts/application.html.erb
210
- - test/dummy/public/422.html
211
- - test/dummy/public/500.html
212
- - test/dummy/public/404.html
213
- - test/dummy/public/favicon.ico
214
- - test/dummy/script/rails
215
213
  - test/dummy/db/tes
216
214
  - test/dummy/db/production.sqlite3
217
- - test/dummy/db/development.sqlite3
218
- - test/dummy/db/test.sqlite3
219
215
  - test/dummy/db/schema.rb
220
- - test/dummy/log/production.log
221
- - test/dummy/log/development.log
216
+ - test/dummy/db/test.sqlite3
217
+ - test/dummy/db/development.sqlite3
218
+ - test/dummy/public/500.html
219
+ - test/dummy/public/422.html
220
+ - test/dummy/public/favicon.ico
221
+ - test/dummy/public/404.html
222
+ - test/dummy/config.ru
222
223
  - test/dummy/log/test.log
224
+ - test/dummy/log/development.log
225
+ - test/dummy/log/production.log
223
226
  - test/dummy/Rakefile
224
- - test/dummy/config.ru
225
- - test/dummy/config/initializers/backtrace_silencers.rb
226
- - test/dummy/config/initializers/session_store.rb
227
- - test/dummy/config/initializers/action_smser.rb
228
- - test/dummy/config/initializers/mime_types.rb
229
- - test/dummy/config/initializers/secret_token.rb
230
- - test/dummy/config/initializers/wrap_parameters.rb
231
- - test/dummy/config/initializers/git_ignored_passwords.rb
232
- - test/dummy/config/initializers/inflections.rb
227
+ - test/dummy/script/rails
228
+ - test/dummy/app/controllers/application_controller.rb
229
+ - test/dummy/app/helpers/application_helper.rb
230
+ - test/dummy/app/views/layouts/application.html.erb
231
+ - test/dummy/app/assets/javascripts/application.js
232
+ - test/dummy/app/assets/stylesheets/application.css
233
+ - test/dummy/app/mailers/hello_smser.rb
234
+ - test/dummy/config/environments/production.rb
235
+ - test/dummy/config/environments/test.rb
236
+ - test/dummy/config/environments/development.rb
233
237
  - test/dummy/config/routes.rb
238
+ - test/dummy/config/boot.rb
239
+ - test/dummy/config/secrets.yml
234
240
  - test/dummy/config/locales/en.yml
235
241
  - test/dummy/config/environment.rb
236
- - test/dummy/config/application.rb
237
- - test/dummy/config/secrets.yml
238
- - test/dummy/config/boot.rb
239
242
  - test/dummy/config/database.yml
240
- - test/dummy/config/environments/production.rb
241
- - test/dummy/config/environments/test.rb
242
- - test/dummy/config/environments/development.rb
243
- - test/integration/navigation_test.rb
244
- - test/test_helper.rb
243
+ - test/dummy/config/application.rb
244
+ - test/dummy/config/initializers/backtrace_silencers.rb
245
+ - test/dummy/config/initializers/session_store.rb
246
+ - test/dummy/config/initializers/wrap_parameters.rb
247
+ - test/dummy/config/initializers/inflections.rb
248
+ - test/dummy/config/initializers/action_smser.rb
249
+ - test/dummy/config/initializers/git_ignored_passwords.rb
250
+ - test/dummy/config/initializers/secret_token.rb
251
+ - test/dummy/config/initializers/mime_types.rb
252
+ - test/unit/action_smser/base_test.rb
253
+ - test/unit/action_smser/delivery_report_test.rb
254
+ - test/unit/action_smser/delivery_methods/delayed_job_test.rb
255
+ - test/unit/action_smser/delivery_methods/smstrade_test.rb
256
+ - test/unit/action_smser/delivery_methods/simple_http_test.rb
257
+ - test/unit/action_smser/delivery_methods/nexmo_test.rb
258
+ - test/unit/action_smser/delivery_methods/test_array_test.rb