ficonabses 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -188,7 +188,7 @@ module FiconabSES
188
188
  # res
189
189
  end
190
190
  def send_campaign_flow_old(destination,campaign_name,options={})
191
- options["destination"]=destination
191
+ options["destination"]=destination if options["destination"]==nil
192
192
  url=self.campaign_flow_params(destination,campaign_name,options)
193
193
  # puts "url is: #{url}"
194
194
  perform(url)
@@ -0,0 +1,29 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+ require File.dirname(__FILE__) + '/test_secret.rb' #FILL IN ACCOUNT/PASSWD AS GLOBALS IN THIS
3
+
4
+ class TestFiconabses < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @account=ACCOUNT #in test_secret.rb put ACCOUNT='youraccount' or insert your parameters direclty here eg @ACCOUNT='myaccount'
8
+ @passwd=PASSWD #in test_secret.rb put PASSWD='yourpasswd'
9
+ # puts "CREDENTIALS ARE: account: #{@account} passwd: #{@passwd}"
10
+ @destination=DESTINATION
11
+ @tsipid=TSIPID
12
+
13
+ @tsipid ='7923044488'
14
+ end
15
+
16
+
17
+
18
+ def test_template_params
19
+ options={}
20
+ options['hello']='TESTING'
21
+ f=FiconabSES::Base.new
22
+ f.set_credentials(@account,@passwd)
23
+ f.set_debug
24
+ res =f.send_template_params(@destination,'testtemplate',options) #no text portion
25
+ puts "RES is: #{res}"
26
+ assert res.include? '200'
27
+ assert false==(res.include? 'Error')
28
+ end
29
+ end
@@ -0,0 +1,44 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestFiconabses < Test::Unit::TestCase
4
+
5
+ def setup
6
+ @f=FiconabSES::Base.new
7
+ @f.set_credentials('scott','scott123')
8
+ # @f.set_debug
9
+ @destination='scott.sproule@gmail.com'
10
+ @tsipid ='7923044488'
11
+ end
12
+
13
+ def test_local_campaign_flownew_performance
14
+ t=Time.now
15
+ 1.upto(40) {
16
+ options={}
17
+ options['hello']='TESTING'
18
+ options['bcinfo']='+6590683565'
19
+ res =@f.send_campaign_flow(@destination,'testthreeminutes',options) #no text portion
20
+ puts "RES is: #{res}"
21
+ assert res.include? '200'
22
+ assert false==(res.include? 'Error')
23
+ }
24
+ timetest=20
25
+ assert Time.now - t < timetest," took longer than #{timetest} seconds: #{t} now: #{Time.now}"
26
+ end
27
+ def test_local_sendtime_tempate
28
+ t=Time.now
29
+ 1.upto(40) {
30
+ options={'sendtime' => "18:00"}
31
+ options['hello']='TESTING'
32
+ options['bcinfo']='+6590683565'
33
+ res =@f.send_template_params(@destination,'expiring_trial',options) #no text portion
34
+ puts "RES is: #{res}"
35
+ assert res.include? '200'
36
+ assert false==(res.include? 'Error')
37
+ }
38
+ timetest=15
39
+ assert Time.now - t < timetest," took longer than #{timetest} seconds: #{t} now: #{Time.now}"
40
+
41
+ end
42
+
43
+
44
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 1
9
- version: 0.4.1
8
+ - 2
9
+ version: 0.4.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Scott Sproule
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-07-06 00:00:00 +08:00
17
+ date: 2012-07-17 00:00:00 +08:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -40,6 +40,8 @@ files:
40
40
  - test/test_helper.rb
41
41
  - test/test_localhost.rb
42
42
  - test/test_localone.rb
43
+ - test/test_localonly.rb
44
+ - test/test_performance.rb
43
45
  - test/test_secret.rb
44
46
  - test/test_smartroam.rb
45
47
  - test/test_smartroam2.rb