nimbleshop_core 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/orders_controller.rb +1 -1
- data/app/views/layouts/admin.html.erb +1 -1
- data/lib/nimbleshop/processor/base.rb +3 -3
- data/lib/nimbleshop/version.rb +1 -1
- data/test/myshop/db/test.sqlite3 +0 -0
- data/test/myshop/log/development.log +130 -0
- data/test/myshop/log/test.log +50912 -0
- data/test/myshop/public/uploads/picture/picture/1/avatar.png +0 -0
- data/test/myshop/public/uploads/picture/picture/1/large_avatar.png +0 -0
- data/test/myshop/public/uploads/picture/picture/1/large_plus_avatar.png +0 -0
- data/test/myshop/public/uploads/picture/picture/1/medium_avatar.png +0 -0
- data/test/myshop/public/uploads/picture/picture/1/medium_plus_avatar.png +0 -0
- data/test/myshop/public/uploads/picture/picture/1/small_avatar.png +0 -0
- data/test/myshop/public/uploads/picture/picture/1/small_plus_avatar.png +0 -0
- data/test/myshop/public/uploads/picture/picture/1/tiny_avatar.png +0 -0
- data/test/myshop/public/uploads/picture/picture/1/tiny_plus_avatar.png +0 -0
- data/test/myshop/tmp/cache/assets/BCD/9E0/sprockets%2F260032d95634ce4697922e0884875144 +0 -0
- data/test/myshop/tmp/cache/assets/C20/3E0/sprockets%2F6272686c233069c041768dc99a62220b +0 -0
- data/test/myshop/tmp/cache/assets/C2B/5F0/sprockets%2F05505887d612a26f2445666a5c648f92 +0 -0
- data/test/myshop/tmp/cache/assets/C2F/840/sprockets%2F6307597ab57709835906888a54cab332 +0 -0
- data/test/myshop/tmp/cache/assets/C42/0A0/sprockets%2Fc3507fa0b5035933d865537bd4740310 +0 -0
- data/test/myshop/tmp/cache/assets/C4A/260/sprockets%2F074340134f0d8585254086cd6b0ec079 +0 -0
- data/test/myshop/tmp/cache/assets/C55/510/sprockets%2F86793486c7111bad49762251eb8028e0 +0 -0
- data/test/myshop/tmp/cache/assets/C57/830/sprockets%2F0818c4536f6a69f5328b7f127045550e +0 -0
- data/test/myshop/tmp/cache/assets/C74/F00/sprockets%2Fc09995330494d994b784c482f881e7d7 +0 -0
- data/test/myshop/tmp/cache/assets/C83/FB0/sprockets%2F8e73221616c6667d207ef9b2074606bd +0 -0
- data/test/myshop/tmp/cache/assets/C8A/9F0/sprockets%2F23c42d96257f3c545c93cf724913e149 +0 -0
- data/test/myshop/tmp/cache/assets/C94/9A0/sprockets%2F082647e39249aef69bb64c139804967b +0 -0
- data/test/myshop/tmp/cache/assets/C96/2C0/sprockets%2Fccc09c0812dab32253f109e528141721 +0 -0
- data/test/myshop/tmp/cache/assets/CAE/D60/sprockets%2F0b804fa342c193ef1978b00a8719807e +0 -0
- data/test/myshop/tmp/cache/assets/CAF/3D0/sprockets%2F7e7328e624d8047ec248e65e1c02f022 +0 -0
- data/test/myshop/tmp/cache/assets/CB3/980/sprockets%2F747860914f389f22ca277b12d3e51d3c +0 -0
- data/test/myshop/tmp/cache/assets/CB3/C10/sprockets%2F77d251a58b446e512a28c42cf91f3756 +0 -0
- data/test/myshop/tmp/cache/assets/CB9/840/sprockets%2Fd030178896ac6530c8375fc5d83782ad +0 -0
- data/test/myshop/tmp/cache/assets/CBD/480/sprockets%2F16696253922f95b0bfbe5029a49498ea +0 -0
- data/test/myshop/tmp/cache/assets/CBD/490/sprockets%2F9130d65760c969b6cfa4c327f56781c4 +0 -0
- data/test/myshop/tmp/cache/assets/CBD/CE0/sprockets%2F2c9388100fa246ffc774943319d6af67 +0 -0
- data/test/myshop/tmp/cache/assets/CC2/EE0/sprockets%2Fd87e8386917dd5fc540a4b28598911b1 +0 -0
- data/test/myshop/tmp/cache/assets/CCA/280/sprockets%2F3453187e9b2e59676bec7b9c831d7395 +0 -0
- data/test/myshop/tmp/cache/assets/CCB/D90/sprockets%2F89860669c589fb1e18f8092558adc60b +0 -0
- data/test/myshop/tmp/cache/assets/CCD/1A0/sprockets%2Fc952c13381140b67cc1fb0b418369bc2 +0 -0
- data/test/myshop/tmp/cache/assets/CCD/470/sprockets%2Fa71a2c66435e2ab2bdc921d024687811 +0 -0
- data/test/myshop/tmp/cache/assets/CD0/DE0/sprockets%2F6de169d6c66927d887590d3354177eee +0 -0
- data/test/myshop/tmp/cache/assets/CD3/A60/sprockets%2Fa2a143650cb9f51c947ee93e52a10461 +0 -0
- data/test/myshop/tmp/cache/assets/CD9/160/sprockets%2F062651b1d2c8b72cdff46e34058c2645 +0 -0
- data/test/myshop/tmp/cache/assets/CD9/420/sprockets%2Ff75c6841b46cad183040008384de8aa7 +0 -0
- data/test/myshop/tmp/cache/assets/CE2/E50/sprockets%2Fd6210be3e136d2e35997d6c884a250d7 +0 -0
- data/test/myshop/tmp/cache/assets/CE7/DF0/sprockets%2Fb21f787a97bd1776a439f6a9c71c0315 +0 -0
- data/test/myshop/tmp/cache/assets/CEA/6E0/sprockets%2F92a120975ff4f91bcf5e37639523ef40 +0 -0
- data/test/myshop/tmp/cache/assets/CEB/670/sprockets%2F6a2e9b7338c55721eb636d3da649991b +0 -0
- data/test/myshop/tmp/cache/assets/CED/220/sprockets%2Ff992264672f1ae94e3f90d3df0f04934 +0 -0
- data/test/myshop/tmp/cache/assets/CF2/8D0/sprockets%2Fc7260e562ed2d849798b25a3944c8bf5 +0 -0
- data/test/myshop/tmp/cache/assets/CF4/B60/sprockets%2F6f53ce7f80736b4c108c5a799853dd74 +0 -0
- data/test/myshop/tmp/cache/assets/CFA/9B0/sprockets%2Fcef7a3a252e4cec0343b64a501468251 +0 -0
- data/test/myshop/tmp/cache/assets/CFB/3B0/sprockets%2F83f0c4ee51108930d6d1c7a02411ace7 +0 -0
- data/test/myshop/tmp/cache/assets/CFB/840/sprockets%2F8f429776bc63f79a20ae860d8b96f781 +0 -0
- data/test/myshop/tmp/cache/assets/D04/A40/sprockets%2F2119a3a04e53c224fb88fe71646f32ca +0 -0
- data/test/myshop/tmp/cache/assets/D04/C90/sprockets%2Fb5f8c6d74454c6163d31a0e2d20906ea +0 -0
- data/test/myshop/tmp/cache/assets/D08/510/sprockets%2F1217f0cbcc084d65ee84c509a80667b0 +0 -0
- data/test/myshop/tmp/cache/assets/D0B/980/sprockets%2Fb2a305322dd4b7f140b98597f729da2d +0 -0
- data/test/myshop/tmp/cache/assets/D0B/A80/sprockets%2Ff3464b1d20ee2562fce680c269243ad8 +0 -0
- data/test/myshop/tmp/cache/assets/D0D/150/sprockets%2Ff0cf80437ce68cad0169a238b243c972 +0 -0
- data/test/myshop/tmp/cache/assets/D0D/340/sprockets%2Ff46a33a80a4d089529b5e3e3c47f4c05 +0 -0
- data/test/myshop/tmp/cache/assets/D10/5A0/sprockets%2Fce19e1808460fd67f2e80751bbe1a491 +0 -0
- data/test/myshop/tmp/cache/assets/D10/F10/sprockets%2F929ce581d09ef8aaed5566c0b1354061 +0 -0
- data/test/myshop/tmp/cache/assets/D11/EF0/sprockets%2F4d99106b5e733e33eb1025adc9f623f9 +0 -0
- data/test/myshop/tmp/cache/assets/D14/1E0/sprockets%2F1ed72090d0906688a4d349ed4f7d01fe +0 -0
- data/test/myshop/tmp/cache/assets/D1F/7C0/sprockets%2F925f6ef4af9d564ba84f21762d16d456 +0 -0
- data/test/myshop/tmp/cache/assets/D28/8B0/sprockets%2F908b68a287fa2dd77450779d95b6bad9 +0 -0
- data/test/myshop/tmp/cache/assets/D2F/C10/sprockets%2F0224fa8eb416275601bbb06ee1197eec +0 -0
- data/test/myshop/tmp/cache/assets/D33/CC0/sprockets%2F9ad24304228467ab60ba2dc9fd624c6b +0 -0
- data/test/myshop/tmp/cache/assets/D38/1A0/sprockets%2Fa3c331e637a4172c04e0b96bff6f753d +0 -0
- data/test/myshop/tmp/cache/assets/D3A/140/sprockets%2F1b2825d88878a9a1cddfeb3285b5100a +0 -0
- data/test/myshop/tmp/cache/assets/D3A/FA0/sprockets%2F9dc100fa3aae8d93d480d7e081337d82 +0 -0
- data/test/myshop/tmp/cache/assets/D3D/F20/sprockets%2Faa7d732e89f3dac8a271d29b852b1074 +0 -0
- data/test/myshop/tmp/cache/assets/D3E/790/sprockets%2F9c4dcba69c3d1496a18010d06f8286dd +0 -0
- data/test/myshop/tmp/cache/assets/D42/360/sprockets%2F0b74d6da10b975d7ea4fa0b0466778f8 +0 -0
- data/test/myshop/tmp/cache/assets/D44/480/sprockets%2F83752178bf80c38e14fbd4ca487a6b4c +0 -0
- data/test/myshop/tmp/cache/assets/D45/350/sprockets%2Fe604e294720f65b985fc630debeb339a +0 -0
- data/test/myshop/tmp/cache/assets/D45/BF0/sprockets%2F4f73996bcdb03f1f6bd088ec775230e1 +0 -0
- data/test/myshop/tmp/cache/assets/D45/EE0/sprockets%2F60e93ca9b4818e772e4f8f3e443ac1d0 +0 -0
- data/test/myshop/tmp/cache/assets/D48/3E0/sprockets%2F490442194945ae74d2fe4bfd6ac4d6d7 +0 -0
- data/test/myshop/tmp/cache/assets/D55/B20/sprockets%2F4f0abe7ebf10e72050e208a9300c0cf7 +0 -0
- data/test/myshop/tmp/cache/assets/D59/690/sprockets%2F43d9ed72bb97785a940468cde6ee5a49 +0 -0
- data/test/myshop/tmp/cache/assets/D63/3B0/sprockets%2F7b712b44a973300c47be7b6abccf8f11 +0 -0
- data/test/myshop/tmp/cache/assets/D63/770/sprockets%2F429ca29eaaec4530fcf651a15ef25208 +0 -0
- data/test/myshop/tmp/cache/assets/D64/A10/sprockets%2F11725b64858ef12e20e4255add3eebda +0 -0
- data/test/myshop/tmp/cache/assets/D69/530/sprockets%2F0d6c156f7e61dc971ec15ebbd5b60083 +0 -0
- data/test/myshop/tmp/cache/assets/D6A/0F0/sprockets%2F6c8022cac929010a2ecfeddf2486358e +0 -0
- data/test/myshop/tmp/cache/assets/D6A/BA0/sprockets%2Fce17cb2d1c87e4208ad8058ed94050dd +0 -0
- data/test/myshop/tmp/cache/assets/D6B/230/sprockets%2F3cdbe792f6989dac643303a3a5a37bc1 +0 -0
- data/test/myshop/tmp/cache/assets/D6C/6F0/sprockets%2F2395bceaae210b9d93c29cc99b425e33 +0 -0
- data/test/myshop/tmp/cache/assets/D6E/5E0/sprockets%2F7c0e8575b9a3069776051cc9aecbacb2 +0 -0
- data/test/myshop/tmp/cache/assets/D70/900/sprockets%2Fd63e881ab0de98c29cf54ea223c550b8 +0 -0
- data/test/myshop/tmp/cache/assets/D71/540/sprockets%2F7f8b8f64991a2b2e80292fe40fccbc02 +0 -0
- data/test/myshop/tmp/cache/assets/D74/0B0/sprockets%2F38fef65e1b5bf25865eab23523edb196 +0 -0
- data/test/myshop/tmp/cache/assets/D74/B60/sprockets%2F338cef2a60cc7e6b54f32fb367d3f079 +0 -0
- data/test/myshop/tmp/cache/assets/D76/220/sprockets%2F8748ace30a059bf844edf9e7a981b10b +0 -0
- data/test/myshop/tmp/cache/assets/D77/ED0/sprockets%2Fda7b03e897b9cd8a719b3425a449ce3d +0 -0
- data/test/myshop/tmp/cache/assets/D79/0F0/sprockets%2F583d27eb5454779d74bb4a542cbc9bfd +0 -0
- data/test/myshop/tmp/cache/assets/D7A/AC0/sprockets%2F7aee88eabcd2c427706f30d8246be895 +0 -0
- data/test/myshop/tmp/cache/assets/D7A/E40/sprockets%2F3d5de9a8d8296d9dd087ce1d8d07011d +0 -0
- data/test/myshop/tmp/cache/assets/D7C/AC0/sprockets%2F337b95d7eb24bcdbf89a6f24549d07a8 +0 -0
- data/test/myshop/tmp/cache/assets/D88/180/sprockets%2F207be29b481a71f20c28a2cedb214fcc +0 -0
- data/test/myshop/tmp/cache/assets/D88/B60/sprockets%2F7c60dd8a4002120f6b29e2ea2d6e2dbc +0 -0
- data/test/myshop/tmp/cache/assets/D8D/180/sprockets%2Fbba7e4bce2a055fd0d657a331434d7f1 +0 -0
- data/test/myshop/tmp/cache/assets/D9A/0C0/sprockets%2F3c40cc90ffd21ec291e2c35875d9bdd1 +0 -0
- data/test/myshop/tmp/cache/assets/D9A/C90/sprockets%2Fef6ea28283f36befb01d50ea82524f2e +0 -0
- data/test/myshop/tmp/cache/assets/D9B/170/sprockets%2Fbbe525f1421628b638ecbe2a5e98de0c +0 -0
- data/test/myshop/tmp/cache/assets/DA0/710/sprockets%2Fc66cd866048bc9b6aaad3f75a14bb567 +0 -0
- data/test/myshop/tmp/cache/assets/DA1/B10/sprockets%2F369f6fcc30aff180c675e17fa3ae8c14 +0 -0
- data/test/myshop/tmp/cache/assets/DA4/0D0/sprockets%2F8ca4adf47d2f99cb9170050bd6c93f2f +0 -0
- data/test/myshop/tmp/cache/assets/DA4/230/sprockets%2Fb95808fc5741b496bc9dbf0ae5c05b4f +0 -0
- data/test/myshop/tmp/cache/assets/DA5/E20/sprockets%2Fcc968ead119b9ad755c6dd6d9c320b35 +0 -0
- data/test/myshop/tmp/cache/assets/DA8/830/sprockets%2F4d9b04623f6ffdeae72c188397acd32f +0 -0
- data/test/myshop/tmp/cache/assets/DAC/740/sprockets%2F9dbbc3cb17806b8ef595afa85904bb88 +0 -0
- data/test/myshop/tmp/cache/assets/DAD/A40/sprockets%2F4dcb48e079ac547cbdf475ca88584bd5 +0 -0
- data/test/myshop/tmp/cache/assets/DB3/C60/sprockets%2Fd2a33078bdd6b3d5be799b7ef4378fd9 +0 -0
- data/test/myshop/tmp/cache/assets/DB6/680/sprockets%2F5921a2ea6c5dfd0b05d00466dca6cd2b +0 -0
- data/test/myshop/tmp/cache/assets/DBA/670/sprockets%2F3894b7598c9eb4c6d66880eedd6baeb5 +0 -0
- data/test/myshop/tmp/cache/assets/DBC/1D0/sprockets%2F715fba3f00362f334beaae3ba7e54be6 +0 -0
- data/test/myshop/tmp/cache/assets/DC0/180/sprockets%2F53acffde562a11301dffae236b375e3e +0 -0
- data/test/myshop/tmp/cache/assets/DC2/810/sprockets%2Fec901b5b7cb5f4aaa770f42a6f107a9d +0 -0
- data/test/myshop/tmp/cache/assets/DC9/760/sprockets%2F0df185dad5cc5738af9c6ab5a33c40d7 +0 -0
- data/test/myshop/tmp/cache/assets/DCC/690/sprockets%2Facc83ee53fd3fe6bf209b0d407924da6 +0 -0
- data/test/myshop/tmp/cache/assets/DCD/000/sprockets%2Fd30835cc3ba67ffc6d3913ced93fb3b3 +0 -0
- data/test/myshop/tmp/cache/assets/DCF/1C0/sprockets%2F42296eec1be44d5af0efefe563414eb6 +0 -0
- data/test/myshop/tmp/cache/assets/DCF/7B0/sprockets%2Fce3a7cd74630b3af080e5bff2c85c9e6 +0 -0
- data/test/myshop/tmp/cache/assets/DD0/040/sprockets%2Fd7e8eb1efb4a3a37e393de0171f9cd53 +0 -0
- data/test/myshop/tmp/cache/assets/DD4/C20/sprockets%2F9cb3062fed4fad2209b96b45fc5ef7d4 +0 -0
- data/test/myshop/tmp/cache/assets/DF2/B80/sprockets%2Faea5e110a5b5445795aee4eb3f1cfd2e +0 -0
- data/test/myshop/tmp/cache/assets/DF6/BD0/sprockets%2F7bc0d205c243a5d6eaf68cefb73fa83a +0 -0
- data/test/myshop/tmp/cache/assets/DF7/210/sprockets%2F5cbe2f9dce9c83c053049ce2a1b7ca4c +0 -0
- data/test/myshop/tmp/cache/assets/DFB/4C0/sprockets%2Fc17634f786d8dacfc7da08aa3abaf309 +0 -0
- data/test/myshop/tmp/cache/assets/DFB/AC0/sprockets%2Fcd38ffa254f2aa5e7b0adfad3e376079 +0 -0
- data/test/myshop/tmp/cache/assets/DFF/CE0/sprockets%2F5b09f3df6587fa0dd0b8bccae956f0e0 +0 -0
- data/test/myshop/tmp/cache/assets/E09/240/sprockets%2F379facffa55119efe51738ccca58c1ef +0 -0
- data/test/myshop/tmp/cache/assets/E4E/350/sprockets%2F1e4de40cd11c8ba8caea57b2ca7e16ef +0 -0
- data/test/myshop/tmp/cache/assets/E52/0A0/sprockets%2F7a3aeacc44aebcb52a09f1aee76719dd +0 -0
- data/test/myshop/tmp/cache/assets/E59/F50/sprockets%2Ff321b3ce47ce73ec1cfead3f39aef0a9 +0 -0
- data/test/myshop/tmp/cache/assets/E5F/C60/sprockets%2Fb95ce7dcf32be0b3cb96ea0b9d75efd2 +0 -0
- data/test/myshop/tmp/cache/assets/E8D/140/sprockets%2F470beb3daed0e63cf3c7f69dce17ebec +0 -0
- data/test/myshop/tmp/cache/assets/E95/E90/sprockets%2Ffbd9cdd1beaf5c67c528a97cbca356fe +0 -0
- data/test/myshop/tmp/cache/assets/EF1/C70/sprockets%2Fd3b9dcddcbc0dabeb498be16d98f3dcf +0 -0
- data/test/myshop/tmp/cache/sass/3d9d79b65012a05959e6fa834d1b6425d941be2b/cart.css.scssc +0 -0
- data/test/myshop/tmp/cache/sass/3d9d79b65012a05959e6fa834d1b6425d941be2b/cart_button.css.scssc +0 -0
- data/test/myshop/tmp/cache/sass/3d9d79b65012a05959e6fa834d1b6425d941be2b/custom.css.scssc +0 -0
- data/test/unit/processor/authorize_net_test.rb +14 -14
- metadata +265 -3
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/myshop/tmp/cache/sass/3d9d79b65012a05959e6fa834d1b6425d941be2b/cart_button.css.scssc
ADDED
Binary file
|
Binary file
|
@@ -8,7 +8,7 @@ module Processor
|
|
8
8
|
@processor = NimbleshopAuthorizedotnet::Processor.new(@order)
|
9
9
|
end
|
10
10
|
|
11
|
-
test
|
11
|
+
test 'when authorization succeeds' do
|
12
12
|
creditcard = build(:creditcard)
|
13
13
|
|
14
14
|
playcasette('authorize.net/authorize-success') do
|
@@ -24,7 +24,7 @@ module Processor
|
|
24
24
|
assert @order.authorized?
|
25
25
|
end
|
26
26
|
|
27
|
-
test
|
27
|
+
test 'authorization fails when credit card number is not entered' do
|
28
28
|
creditcard = build(:creditcard, number: nil)
|
29
29
|
assert_equal false, @processor.authorize(creditcard: creditcard)
|
30
30
|
assert_equal 'Please enter credit card number', @processor.errors.first
|
@@ -35,7 +35,7 @@ module Processor
|
|
35
35
|
assert @order.abandoned?
|
36
36
|
end
|
37
37
|
|
38
|
-
test
|
38
|
+
test 'authorization fails with invalid credit card number' do
|
39
39
|
creditcard = build(:creditcard, number: 2)
|
40
40
|
|
41
41
|
playcasette('authorize.net/authorize-failure') do
|
@@ -64,11 +64,11 @@ module Processor
|
|
64
64
|
@tsx_id = @order.payment_transactions.last.transaction_gid
|
65
65
|
end
|
66
66
|
|
67
|
-
test
|
67
|
+
test 'when capture succeeds' do
|
68
68
|
creditcard = build(:creditcard)
|
69
69
|
|
70
70
|
playcasette('authorize.net/capture-success') do
|
71
|
-
assert_equal true, @processor.
|
71
|
+
assert_equal true, @processor.kapture(transaction_gid: @tsx_id)
|
72
72
|
end
|
73
73
|
|
74
74
|
@order.reload
|
@@ -78,11 +78,11 @@ module Processor
|
|
78
78
|
assert @order.purchased?
|
79
79
|
end
|
80
80
|
|
81
|
-
test
|
81
|
+
test 'when capture fails' do
|
82
82
|
creditcard = build(:creditcard, number: 2)
|
83
83
|
|
84
84
|
playcasette('authorize.net/capture-failure') do
|
85
|
-
assert_equal false, @processor.
|
85
|
+
assert_equal false, @processor.kapture(transaction_gid: @tsx_id)
|
86
86
|
assert_equal 'Capture failed', @processor.errors.first
|
87
87
|
end
|
88
88
|
|
@@ -112,7 +112,7 @@ module Processor
|
|
112
112
|
@transaction = @order.payment_transactions.last
|
113
113
|
end
|
114
114
|
|
115
|
-
test
|
115
|
+
test 'when refund succeeds' do
|
116
116
|
|
117
117
|
playcasette('authorize.net/refund-success') do
|
118
118
|
assert_equal true, @processor.refund(transaction_gid: @transaction.transaction_gid,
|
@@ -128,7 +128,7 @@ module Processor
|
|
128
128
|
assert @order.refunded?
|
129
129
|
end
|
130
130
|
|
131
|
-
test
|
131
|
+
test 'when refund fails' do
|
132
132
|
|
133
133
|
playcasette('authorize.net/refund-failure') do
|
134
134
|
assert_equal false, @processor.refund(transaction_gid: @transaction.transaction_gid, card_number: '1234')
|
@@ -157,7 +157,7 @@ module Processor
|
|
157
157
|
@tsx_id = @order.payment_transactions.last.transaction_gid
|
158
158
|
end
|
159
159
|
|
160
|
-
test
|
160
|
+
test 'when capture succeeds' do
|
161
161
|
playcasette('authorize.net/void-success') do
|
162
162
|
assert_equal true, @processor.void(transaction_gid: @tsx_id)
|
163
163
|
end
|
@@ -171,7 +171,7 @@ module Processor
|
|
171
171
|
assert @order.voided?
|
172
172
|
end
|
173
173
|
|
174
|
-
test
|
174
|
+
test 'when capture fails' do
|
175
175
|
playcasette('authorize.net/void-failure') do
|
176
176
|
assert_equal false, @processor.void(transaction_gid: @tsx_id)
|
177
177
|
end
|
@@ -192,7 +192,7 @@ module Processor
|
|
192
192
|
@processor = NimbleshopAuthorizedotnet::Processor.new(@order)
|
193
193
|
end
|
194
194
|
|
195
|
-
test
|
195
|
+
test 'when purchase succeeds' do
|
196
196
|
creditcard = build(:creditcard)
|
197
197
|
|
198
198
|
playcasette('authorize.net/purchase-success') do
|
@@ -207,7 +207,7 @@ module Processor
|
|
207
207
|
assert @order.purchased?
|
208
208
|
end
|
209
209
|
|
210
|
-
test
|
210
|
+
test 'purchase fails when credit card number is not entered ' do
|
211
211
|
creditcard = build(:creditcard, number: nil)
|
212
212
|
|
213
213
|
playcasette('authorize.net/purchase-failure') do
|
@@ -218,7 +218,7 @@ module Processor
|
|
218
218
|
assert @order.abandoned?
|
219
219
|
end
|
220
220
|
|
221
|
-
test
|
221
|
+
test 'purchase fails when invalid credit card number is entered' do
|
222
222
|
creditcard = build(:creditcard, number: 2)
|
223
223
|
|
224
224
|
playcasette('authorize.net/purchase-failure') do
|