adyen-admin 0.0.16 → 0.0.17

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.
Files changed (37) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +2 -0
  3. data/.rspec +1 -0
  4. data/CHANGES.md +6 -0
  5. data/LICENSE +1 -1
  6. data/Rakefile +0 -18
  7. data/VERSION +1 -1
  8. data/credentials.yml.example +8 -0
  9. data/lib/adyen-admin.rb +1 -1
  10. data/lib/adyen-admin/skin.rb +19 -14
  11. data/spec/adyen-admin/client_spec.rb +1 -1
  12. data/spec/adyen-admin/skin_spec.rb +47 -75
  13. data/spec/fixtures/cassettes/Adyen_Admin_Client/_get/raises_authenticated_error_when_not_logged_in.yml +136 -234
  14. data/spec/fixtures/cassettes/Adyen_Admin_Client/_get/sets_authenticated_to_false_on_error.yml +136 -234
  15. data/spec/fixtures/cassettes/Adyen_Admin_Client/_login/passes_with_correct_username_password.yml +321 -565
  16. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_all/freezes_local_skins.yml +147 -271
  17. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_all/returns_the_skins.yml +147 -271
  18. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_all_remote/returns_the_skins.yml +147 -271
  19. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_all_remote/sets_local_path.yml +147 -271
  20. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_download/gets_the_file.yml +10207 -5552
  21. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_download/is_a_zipfile.yml +10207 -5552
  22. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_find/returns_no_skin.yml +147 -271
  23. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_find/returns_the_skin.yml +147 -271
  24. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_test_url/.yml +530 -0
  25. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_update/create_skin_yml_file.yml +426 -756
  26. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_upload/valid_set/increases_version.yml +12004 -8414
  27. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_upload/valid_set/updates_skin_data.yml +10875 -6358
  28. data/spec/fixtures/cassettes/login.yml +321 -565
  29. data/spec/fixtures/skins/example-qaJKoAMQ/css/print.css +17 -0
  30. data/spec/fixtures/skins/example-qaJKoAMQ/img/bg.gif +0 -0
  31. data/spec/spec_helper.rb +15 -2
  32. metadata +55 -38
  33. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_decompile/new_remote_skin/downloads_and_decompiles_skin.yml +0 -1441
  34. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_remote_version/returns_live_value.yml +0 -77
  35. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_remote_version/returns_test_value.yml +0 -77
  36. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_remote_version/returns_uploaded_value.yml +0 -666
  37. data/spec/fixtures/cassettes/Adyen_Admin_Skin/authenticated/_test_url/returns_url_to_test.yml +0 -941
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzI5NzJjMjQ2ZGZlMWIyMTUxODBlNTJkYzg1ZjgyOGJjNDllMGQxYw==
5
+ data.tar.gz: !binary |-
6
+ YzQ1OGY5ZTZlN2RjOWRkZjRkZmJlMjY1YTc3ZGY4NjYxMjJkZjcyZA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ OWRhZjM1NzExYzJiYzliNzk0Mzk4YWRhNDVjNWM0YWU5ODQzMWNmZWI2NjEy
10
+ NWQ2NTRlMDU2NWNmZTM4YTc4OTc1ZTdkMjA2ZDg4Yzc2OGJlNzU2M2FmNjA4
11
+ MTBhMTA1ZWRjNjU3ZTZlOGQ3YTkzYzcwZmU4NjNkMTg4YjdhMjk=
12
+ data.tar.gz: !binary |-
13
+ OTE0MGI0MmM1NjY1NzljY2UyYmQzNzMyZTRkMGZlOTUxNjdmNzY3NGY3YmY3
14
+ YmQ3MmVkZGQ3MzE0Y2IzM2NhODZkOThmOWE2Y2UzNjA2NDAyNjI1MWFjZTc5
15
+ YjNmNDkzNzMyNmVkYzBlZmM3MmIzOTQ3ZmIzMWFjY2RlMDlhYzk=
data/.gitignore CHANGED
@@ -3,3 +3,5 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  .rvmrc
6
+ .ruby-*
7
+ credentials.yml
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/CHANGES.md CHANGED
@@ -5,6 +5,12 @@
5
5
  * add CLI binaries (to compile + upload) -> read from .adyenrc file
6
6
  * make compatible with Live system
7
7
 
8
+ ## v0.0.17 - 15-11-2013
9
+ * fixed upload
10
+ * gem updates
11
+ * exclude + filter sensitive vcr data
12
+ * spec cleanup
13
+
8
14
  ## v0.0.16 - 19-06-2012
9
15
  * config parent_skin via skin file
10
16
  * throw exception when including subdirectory of subdirectories.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012, SoundCloud, Tobias Bielohlawek
1
+ Copyright (c) 2013, SoundCloud, Tobias Bielohlawek
2
2
 
3
3
  All rights reserved.
4
4
 
data/Rakefile CHANGED
@@ -4,21 +4,3 @@ require 'rspec/core/rake_task'
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
6
  task :default => :spec
7
-
8
- task :anonym, :tokens do |t, args|
9
- replace = args[:tokens].split(" ").map do |token|
10
- from, to = token.split(":")
11
- "s/#{from}/#{to}/g"
12
- end
13
-
14
- `find -E . -regex '^.+\.(rb|yml)$' -exec sed -i "" "#{replace.join(";")}" {} \\;`
15
- end
16
-
17
- task :deanonym, :tokens do |t, args|
18
- replace = args[:tokens].split(" ").map do |token|
19
- from, to = token.split(":")
20
- "s/#{to}/#{from}/g"
21
- end
22
-
23
- `find -E . -regex '^.+\.(rb|yml)$' -exec sed -i "" "#{replace.join(";")}" {} \\;`
24
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.16
1
+ 0.0.17
@@ -0,0 +1,8 @@
1
+ ---
2
+ :account: DummyAccount
3
+ :user: DummyUser
4
+ :password: Password
5
+ :test_skin_code: qaJKoAMQ
6
+ :other_skin_codes:
7
+ - xxx1
8
+ - cccc2
data/lib/adyen-admin.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2012, SoundCloud Ltd., Tobias Bielohlawek
1
+ # Copyright (c) 2013, SoundCloud Ltd., Tobias Bielohlawek
2
2
 
3
3
  require 'adyen-admin/client'
4
4
  require 'adyen-admin/skin'
@@ -1,18 +1,18 @@
1
1
  require 'tempfile'
2
- require 'zip/zip'
2
+ require 'zip'
3
3
  require 'yaml'
4
4
 
5
5
  module Adyen
6
6
  module Admin
7
7
  class Skin
8
- UPLOAD = "https://ca-test.adyen.com/ca/ca/skin/uploadskin.shtml?skinCode=%s"
9
- DOWNLOAD = "https://ca-test.adyen.com/ca/ca/skin/downloadskinsubmit.shtml?downloadSkin=Download&skinCode=%s"
10
- TEST = "https://ca-test.adyen.com/ca/ca/skin/testpayment.shtml?skinCode=%s"
11
-
12
- VERSION_TEST = "https://test.adyen.com/hpp/version.shtml?skinCode=%s"
13
- VERSION_LIVE = "https://live.adyen.com/hpp/version.shtml?skinCode=%s"
14
- PUBLISH = "https://ca-test.adyen.com/ca/ca/skin/publishskin.shtml?skinCode=%s"
15
- SKINS = "https://ca-test.adyen.com/ca/ca/skin/skins.shtml"
8
+ UPLOAD_SELECT = "https://ca-test.adyen.com/ca/ca/skin/skins.shtml"
9
+ UPLOAD = "uploadskin.shtml?skinCode=%s"
10
+ DOWNLOAD = "https://ca-test.adyen.com/ca/ca/skin/downloadskinsubmit.shtml?downloadSkin=Download&skinCode=%s"
11
+ TEST = "https://ca-test.adyen.com/ca/ca/skin/testpayment.shtml?skinCode=%s"
12
+ VERSION_TEST = "https://test.adyen.com/hpp/version.shtml?skinCode=%s"
13
+ VERSION_LIVE = "https://live.adyen.com/hpp/version.shtml?skinCode=%s"
14
+ PUBLISH = "https://ca-test.adyen.com/ca/ca/skin/publishskin.shtml?skinCode=%s"
15
+ SKINS = "https://ca-test.adyen.com/ca/ca/skin/skins.shtml"
16
16
 
17
17
  attr_reader :code, :name, :path
18
18
 
@@ -132,6 +132,10 @@ module Adyen
132
132
  skin_data[:parent_skin] || "base"
133
133
  end
134
134
 
135
+ def default_data
136
+ skin_data[:default_data] || {}
137
+ end
138
+
135
139
  ##########################################
136
140
 
137
141
  def update
@@ -169,7 +173,7 @@ module Adyen
169
173
  `mkdir -p #{decompile_path}`
170
174
  end
171
175
 
172
- Zip::ZipFile.open(filename) do |zip_file|
176
+ Zip::File.open(filename) do |zip_file|
173
177
  zip_file.each do |file|
174
178
  f_path = File.join(self.path || decompile_path, file.name.gsub("#{code}/", ""))
175
179
  FileUtils.mkdir_p(File.dirname(f_path))
@@ -205,7 +209,7 @@ module Adyen
205
209
 
206
210
  outfile.tap do |filename|
207
211
  `rm -f #{filename}`
208
- Zip::ZipFile.open(filename, Zip::ZipFile::CREATE) do |zip_file|
212
+ Zip::File.open(filename, Zip::File::CREATE) do |zip_file|
209
213
  Dir["#{path}/**/**"].each do |file|
210
214
  next if file =~ exclude
211
215
  raise if nested_subdirectory?(path, file)
@@ -229,12 +233,13 @@ module Adyen
229
233
  # http://stackoverflow.com/questions/3420587/ruby-mechanize-multipart-form-with-file-upload-to-a-mediawiki
230
234
  def upload
231
235
  file = self.compress
232
- page = Adyen::Admin.get(UPLOAD % code)
236
+
237
+ page = Adyen::Admin.get(UPLOAD_SELECT)
238
+ page = page.link_with(:href => Regexp.new(Regexp.escape(UPLOAD % code))).click
233
239
  page = Adyen::Admin.client.submit(page.form.tap do |form|
234
240
  form.file_uploads.first.file_name = file
235
241
  end)
236
- form = page.form
237
- page = form.submit(page.form.button_with(:name => 'submit'))
242
+ page = page.form.submit(page.form.button_with(:name => 'submit'))
238
243
  update
239
244
  end
240
245
 
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  require "adyen-admin/client"
4
4
 
5
5
  describe Adyen::Admin::Client, :vcr do
6
- let(:login) { Adyen::Admin.login("SoundCloud", "skinadmin", "12312311") }
6
+ let(:login) { Adyen::Admin.login($adyen[:account], $adyen[:user], $adyen[:password]) }
7
7
 
8
8
  before do
9
9
  Adyen::Admin.client.cookie_jar.clear!
@@ -6,9 +6,16 @@ require "adyen-admin/skin"
6
6
  module Adyen::Admin
7
7
  describe Skin, :vcr do
8
8
  let(:skin_fixtures) { File.expand_path 'spec/fixtures/skins' }
9
- let(:skin_code) { "7hFAQnmt" }
9
+ let(:skin_code) { $adyen[:test_skin_code] }
10
+ let(:path) { "#{skin_fixtures}/#{skin_code}" }
10
11
  let(:skin) { Skin.new(:code => skin_code, :name => "example") }
11
12
 
13
+ let(:other_skins) do
14
+ $adyen[:other_skin_codes].map do |code|
15
+ Skin.new(:code => code, :name => "example")
16
+ end
17
+ end
18
+
12
19
  describe ".all" do
13
20
  it 'returns all local skins' do
14
21
  Skin.all.should == Skin.all_local
@@ -19,7 +26,7 @@ module Adyen::Admin
19
26
  before(:all) do
20
27
  VCR.use_cassette("login") do
21
28
  Adyen::Admin.client.cookie_jar.clear!
22
- Adyen::Admin.login("SoundCloud", "skinadmin", "12312311")
29
+ Adyen::Admin.login($adyen[:account], $adyen[:user], $adyen[:password])
23
30
  end
24
31
  end
25
32
 
@@ -31,14 +38,12 @@ module Adyen::Admin
31
38
  it 'returns the skins' do
32
39
  Skin.all_remote.should =~ [
33
40
  skin,
34
- Skin.new(:code => "Kx9axnRf", :name => "demo"),
35
- Skin.new(:code => "vQW0fEo8", :name => "test"),
36
- ]
41
+ ] + other_skins
37
42
  end
38
43
 
39
44
  it 'sets local path' do
40
45
  Adyen::Admin::Skin.default_path = skin_fixtures
41
- Skin.all_remote.first.path.should == "#{skin_fixtures}/example-7hFAQnmt"
46
+ Skin.find(skin_code).path.should == "#{skin_fixtures}/example-#{skin_code}"
42
47
  end
43
48
  end
44
49
 
@@ -46,9 +51,10 @@ module Adyen::Admin
46
51
  it 'returns the skins' do
47
52
  Skin.all_local.should =~ [
48
53
  Skin.new(:code => "base"),
49
- skin,
50
54
  Skin.new(:code => "DV3tf95f"),
51
55
  Skin.new(:code => "JH0815"),
56
+ Skin.new(:code => "7hFAQnmt"),
57
+ skin,
52
58
  ]
53
59
  end
54
60
  end
@@ -56,13 +62,12 @@ module Adyen::Admin
56
62
  describe ".all" do
57
63
  it 'returns the skins' do
58
64
  Skin.all.should =~ [
59
- skin,
60
- Skin.new(:code => "Kx9axnRf", :name => "demo"),
61
- Skin.new(:code => "vQW0fEo8", :name => "test"),
62
65
  Skin.new(:code => "base"),
63
66
  Skin.new(:code => "DV3tf95f"),
64
- Skin.new(:code => "JH0815")
65
- ]
67
+ Skin.new(:code => "JH0815"),
68
+ Skin.new(:code => "7hFAQnmt"),
69
+ skin,
70
+ ] + other_skins
66
71
  end
67
72
 
68
73
  it 'freezes local skins' do
@@ -81,7 +86,7 @@ module Adyen::Admin
81
86
  end
82
87
 
83
88
  describe "#new" do
84
- let(:path) { "#{skin_fixtures}/example-7hFAQnmt" }
89
+ let(:path) { "#{skin_fixtures}/example-#{skin_code}" }
85
90
 
86
91
  it "sets code attribute" do
87
92
  Skin.new(:code => skin_code).code.should == skin_code
@@ -96,7 +101,7 @@ module Adyen::Admin
96
101
  end
97
102
 
98
103
  it "auto sets code from path" do
99
- Skin.new(:path => path).code.should == "7hFAQnmt"
104
+ Skin.new(:path => path).code.should == skin_code
100
105
  end
101
106
 
102
107
  it "auto sets name from path" do
@@ -116,7 +121,7 @@ module Adyen::Admin
116
121
  end
117
122
 
118
123
  context "slash in name" do
119
- let(:path) { "#{skin_fixtures}/example-test-7hFAQnmt" }
124
+ let(:path) { "#{skin_fixtures}/example-test-#{skin_code}" }
120
125
 
121
126
  it "sets name" do
122
127
  Skin.stub(:is_skin_path?).and_return(true)
@@ -167,7 +172,7 @@ module Adyen::Admin
167
172
  end
168
173
 
169
174
  describe "#update" do
170
- let(:path) { "#{skin_fixtures}/example-7hFAQnmt" }
175
+ let(:path) { "#{skin_fixtures}/example-#{skin_code}" }
171
176
 
172
177
  before do
173
178
  skin.path = path
@@ -222,15 +227,17 @@ module Adyen::Admin
222
227
  end
223
228
 
224
229
  it "is a zipfile" do
225
- Zip::ZipFile.open(skin.download) do |zipfile|
230
+ Zip::File.open(skin.download) do |zipfile|
226
231
  zipfile.find_entry(File.join(skin_code, "inc", "cheader.txt")).should be_true
227
232
  end
228
233
  end
229
234
  end
230
235
 
231
236
  describe "#decompile" do
237
+ subject { skin.decompile(zip_filename) }
238
+
232
239
  let(:skin_code) { "DV3tf95f" }
233
- let(:skin) { Skin.new(:path => "#{skin_fixtures}/#{skin_code}") }
240
+ let(:skin) { Skin.new(:path => path) }
234
241
 
235
242
  after do
236
243
  `rm -rf #{zip_filename}`
@@ -241,41 +248,23 @@ module Adyen::Admin
241
248
  let!(:zip_filename) { skin.compress(nil) }
242
249
 
243
250
  before do
244
- `cp -r #{skin_fixtures}/#{skin_code} #{skin_fixtures}/_backup`
251
+ `cp -r #{path} #{skin_fixtures}/_backup`
245
252
  end
246
253
 
247
254
  after do
248
- `rm -rf #{backup_filename} #{skin_fixtures}/#{skin_code}`
249
- `mv #{skin_fixtures}/_backup #{skin_fixtures}/#{skin_code}`
255
+ `rm -rf #{backup_filename} #{path}`
256
+ `mv #{skin_fixtures}/_backup #{path}`
250
257
  end
251
258
 
252
259
  it "creates backup" do
253
- skin.decompile(zip_filename)
254
-
260
+ subject
255
261
  File.should be_exists(backup_filename)
256
262
  end
257
263
 
258
264
  it "unzips files" do
259
265
  `rm -rf #{skin.path}`
260
266
 
261
- expect do
262
- skin.decompile(zip_filename)
263
- end.to change { File.exists?(File.join(skin.path, 'inc', 'order_data.txt')) }
264
- end
265
- end
266
-
267
- context "new remote skin" do
268
- let(:skin) { Skin.new(:name => "test", :code => "vQW0fEo8") }
269
- let!(:zip_filename) { skin.download }
270
-
271
- after do
272
- `rm -rf #{skin.path}`
273
- end
274
-
275
- it "downloads and decompiles skin" do
276
- expect do
277
- skin.decompile(zip_filename)
278
- end.to change { skin.path }
267
+ expect { subject }.to change { File.exists?(File.join(skin.path, 'inc', 'order_data.txt')) }
279
268
  end
280
269
  end
281
270
  end
@@ -294,30 +283,30 @@ module Adyen::Admin
294
283
  end
295
284
 
296
285
  it 'writes cheader' do
297
- File.read( skin.path + '/inc/cheader.txt').should == "<!-- ### inc/cheader_[locale].txt or inc/cheader.txt (fallback) ### -->"
286
+ File.read(skin.path + '/inc/cheader.txt').should == "<!-- ### inc/cheader_[locale].txt or inc/cheader.txt (fallback) ### -->"
298
287
  end
299
288
 
300
289
  it 'writes pmheader' do
301
- File.read( skin.path + '/inc/pmheader.txt').should == "<!-- ### inc/pmheader_[locale].txt or inc/pmheader.txt (fallback) ### -->"
290
+ File.read(skin.path + '/inc/pmheader.txt').should == "<!-- ### inc/pmheader_[locale].txt or inc/pmheader.txt (fallback) ### -->"
302
291
  end
303
292
 
304
293
  it 'writes pmfooter' do
305
- File.read( skin.path + '/inc/pmfooter.txt').should == "<!-- ### inc/pmfooter_[locale].txt or inc/pmfooter.txt (fallback) ### -->\n\n <!-- ### inc/customfields_[locale].txt or inc/customfields.txt (fallback) ### -->"
294
+ File.read(skin.path + '/inc/pmfooter.txt').should == "<!-- ### inc/pmfooter_[locale].txt or inc/pmfooter.txt (fallback) ### -->\n\n <!-- ### inc/customfields_[locale].txt or inc/customfields.txt (fallback) ### -->"
306
295
  end
307
296
 
308
297
  it 'writes cfooter' do
309
- File.read( skin.path + '/inc/cfooter.txt').should == "<!-- ### inc/cfooter_[locale].txt or inc/cfooter.txt (fallback) ### -->"
298
+ File.read(skin.path + '/inc/cfooter.txt').should == "<!-- ### inc/cfooter_[locale].txt or inc/cfooter.txt (fallback) ### -->"
310
299
  end
311
300
  end
312
301
 
313
302
  describe "#compress" do
303
+ subject(:zip_filename){ skin.compress }
304
+
314
305
  let(:skin_code) { "DV3tf95f" }
315
- let(:path) { "#{skin_fixtures}/#{skin_code}" }
316
306
  let(:skin) { Skin.new(:path => path) }
317
- let(:zip_filename) { skin.compress }
318
307
 
319
308
  def zip_contains(file)
320
- Zip::ZipFile.open(zip_filename) do |zipfile|
309
+ Zip::File.open(zip_filename) do |zipfile|
321
310
  return true if zipfile.find_entry(File.join(skin.code, file))
322
311
  end
323
312
  false
@@ -401,10 +390,10 @@ module Adyen::Admin
401
390
  end
402
391
 
403
392
  context "with parent_skin" do
404
- let(:skin_code) { "JH0815" }
393
+ let(:parent_skin_code) { $adyen[:test_skin_code] }
405
394
 
406
395
  before do
407
- skin.stub(:parent_skin).and_return("example-7hFAQnmt")
396
+ skin.stub(:parent_skin).and_return("example-#{parent_skin_code}")
408
397
  end
409
398
 
410
399
  it "excludes meta file" do
@@ -414,7 +403,9 @@ module Adyen::Admin
414
403
  end
415
404
 
416
405
  describe "#upload" do
417
- let(:path) { "#{skin_fixtures}/example-7hFAQnmt" }
406
+ subject { skin.upload }
407
+
408
+ let(:path) { "#{skin_fixtures}/example-#{skin_code}" }
418
409
 
419
410
  after do
420
411
  `rm -f #{skin_code}.zip`
@@ -427,40 +418,21 @@ module Adyen::Admin
427
418
  end
428
419
 
429
420
  it "increases version" do
430
- expect do
431
- skin.upload
432
- end.to change { skin.send(:remote_version) }.by(1)
421
+ expect { subject }.to change { skin.send(:remote_version) }.by(1)
433
422
  end
434
423
 
435
424
  it "updates skin data" do
436
425
  skin.should_receive(:update)
437
426
 
438
- skin.upload
427
+ subject
439
428
  end
440
429
  end
441
430
  end
442
431
 
443
- describe "#remote_version" do
444
- let(:skin) { Skin.new(:code => "Kx9axnRf", :name => "demo") }
445
- let(:version) { 17 }
446
-
447
- it "returns uploaded value" do
448
- skin.send(:remote_version).should == version
449
- end
450
-
451
- it "returns test value" do
452
- skin.send(:remote_version, :test).should == version
453
- end
454
-
455
- it "returns live value" do
456
- skin.send(:remote_version, :live).should == 0
457
- end
458
- end
459
-
460
432
  describe "#test_url" do
461
- it "returns url to test" do
462
- skin.test_url.to_s.should include("https://test.adyen.com/hpp/select.shtml")
463
- end
433
+ subject { skin.test_url.to_s }
434
+
435
+ it { should include("https://test.adyen.com/hpp/pay.shtml") }
464
436
  #todo test with options
465
437
  end
466
438
  end