ivapi 1.5.0 → 1.6.0

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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -7
  3. data/.travis.yml +2 -2
  4. data/Gemfile +6 -4
  5. data/LICENSE +1 -1
  6. data/README.md +1 -3
  7. data/Rakefile +2 -0
  8. data/ivapi.gemspec +34 -20
  9. data/lib/ivapi.rb +3 -0
  10. data/lib/ivapi/authentication.rb +2 -0
  11. data/lib/ivapi/client.rb +2 -0
  12. data/lib/ivapi/client/account.rb +2 -0
  13. data/lib/ivapi/client/base.rb +2 -0
  14. data/lib/ivapi/client/hosting.rb +2 -0
  15. data/lib/ivapi/client/server.rb +2 -0
  16. data/lib/ivapi/configuration.rb +2 -0
  17. data/lib/ivapi/default.rb +4 -2
  18. data/lib/ivapi/error.rb +3 -1
  19. data/lib/ivapi/mash.rb +2 -0
  20. data/lib/ivapi/response/raise_error.rb +2 -0
  21. data/lib/ivapi/response/rename_keys.rb +2 -0
  22. data/lib/ivapi/version.rb +3 -1
  23. metadata +18 -70
  24. data/spec/fixtures/account_bonuses.json +0 -20
  25. data/spec/fixtures/account_credits.json +0 -1
  26. data/spec/fixtures/account_info.json +0 -42
  27. data/spec/fixtures/account_orders.json +0 -29
  28. data/spec/fixtures/account_services.json +0 -35
  29. data/spec/fixtures/hosting_info.json +0 -3
  30. data/spec/fixtures/server_change.json +0 -3
  31. data/spec/fixtures/server_domain.json +0 -3
  32. data/spec/fixtures/server_firewall.json +0 -3
  33. data/spec/fixtures/server_flush_iptables.json +0 -3
  34. data/spec/fixtures/server_graphs.json +0 -26
  35. data/spec/fixtures/server_info.json +0 -30
  36. data/spec/fixtures/server_move_ip.json +0 -4
  37. data/spec/fixtures/server_os.json +0 -132
  38. data/spec/fixtures/server_ptr.json +0 -4
  39. data/spec/fixtures/server_reboot.json +0 -3
  40. data/spec/fixtures/server_recreate.json +0 -3
  41. data/spec/fixtures/server_reset_password.json +0 -3
  42. data/spec/fixtures/server_tasks.json +0 -14
  43. data/spec/fixtures/version.json +0 -3
  44. data/spec/ivapi/client/account_spec.rb +0 -95
  45. data/spec/ivapi/client/hosting_spec.rb +0 -32
  46. data/spec/ivapi/client/server_spec.rb +0 -191
  47. data/spec/ivapi/client_spec.rb +0 -62
  48. data/spec/ivapi/error_spec.rb +0 -22
  49. data/spec/ivapi_spec.rb +0 -7
  50. data/spec/spec_helper.rb +0 -66
@@ -1,20 +0,0 @@
1
- [
2
- {
3
- "bo_id": "1",
4
- "bo_created": "2013-03-01 12:12:12",
5
- "bo_amount": "1.00",
6
- "bo_description": "SMS +370.61234567 (example)"
7
- },
8
- {
9
- "bo_id": "2",
10
- "bo_created": "2013-03-02 12:12:12",
11
- "bo_amount": "2.00",
12
- "bo_description": "SMS +370.61234568 (example)"
13
- },
14
- {
15
- "bo_id": "3",
16
- "bo_created": "2013-03-03 12:12:12",
17
- "bo_amount": "3.00",
18
- "bo_description": "SMS +370.61234569 (example)"
19
- }
20
- ]
@@ -1 +0,0 @@
1
- []
@@ -1,42 +0,0 @@
1
- {
2
- "ac_id":"1",
3
- "ac_created":"2012-12-12 12:12:12",
4
- "ac_company":null,
5
- "ac_name":"Name Surname",
6
- "ac_occupation":null,
7
- "ac_code":"",
8
- "ac_vat":null,
9
- "ac_address":"Address",
10
- "ac_city":"",
11
- "ac_state":null,
12
- "ac_zip":null,
13
- "ac_country":"",
14
- "ac_phone":"",
15
- "ac_mobile":null,
16
- "ac_fax":null,
17
- "ac_email":"name@test.com",
18
- "ac_bank_account":null,
19
- "ac_bank":null,
20
- "ac_bank_code":null,
21
- "ac_credit":"0",
22
- "ac_bonus":"0",
23
- "ac_contacts":[],
24
- "ac_users":[
25
- {
26
- "us_id":"1",
27
- "us_created":"2009-10-07 21:50:17",
28
- "us_inactive":"no",
29
- "us_subuser":"no",
30
- "us_nick":"foobar",
31
- "us_description":null
32
- },
33
- {
34
- "us_id":"2",
35
- "us_created":"2012-11-06 21:06:53",
36
- "us_inactive":"no",
37
- "us_subuser":"yes",
38
- "us_nick":"foobarapi",
39
- "us_description":"API"
40
- }
41
- ]
42
- }
@@ -1,29 +0,0 @@
1
- [
2
- {
3
- "or_id": "1",
4
- "or_created": "2011-11-11 11:11:11",
5
- "or_paid": null,
6
- "or_series": null,
7
- "or_number": null,
8
- "or_cost": "11.11",
9
- "or_url": "https://saskaitos.iv.lt/"
10
- },
11
- {
12
- "or_id": "2",
13
- "or_created": "2012-12-12 12:12:12",
14
- "or_paid": "2012-12-12 13:12:12",
15
- "or_series": "IV",
16
- "or_number": "121212",
17
- "or_cost": "12.12",
18
- "or_url": "https://saskaitos.iv.lt/"
19
- },
20
- {
21
- "or_id": "3",
22
- "or_created": "2013-12-13 13:13:13",
23
- "or_paid": "2013-12-13 14:13:13",
24
- "or_series": "IV",
25
- "or_number": "131313",
26
- "or_cost": "13.13",
27
- "or_url": "https://saskaitos.iv.lt/"
28
- }
29
- ]
@@ -1,35 +0,0 @@
1
- [
2
- {
3
- "se_id": "1",
4
- "se_created": "2012-12-12 12:12:12",
5
- "se_since": "2012-12-12",
6
- "se_until": "2013-12-12",
7
- "se_quantity": "1",
8
- "se_price": "29.00",
9
- "se_discount": "0",
10
- "se_unit": "m.",
11
- "se_description": "Adreso metinis mokestis (example.com)"
12
- },
13
- {
14
- "se_id": "2",
15
- "se_created": "2013-01-01 12:12:12",
16
- "se_since": "2013-01-01",
17
- "se_until": "2014-01-01",
18
- "se_quantity": "1",
19
- "se_price": "29.00",
20
- "se_discount": "0",
21
- "se_unit": "m.",
22
- "se_description": "Adreso metinis mokestis (example2.com)"
23
- },
24
- {
25
- "se_id": "3",
26
- "se_created": "2013-02-02 12:12:12",
27
- "se_since": "2013-02-02",
28
- "se_until": "2013-03-02",
29
- "se_quantity": "1",
30
- "se_price": "10.00",
31
- "se_discount": "10",
32
- "se_unit": "mėn.",
33
- "se_description": "Serverio nuoma (planas 1GHz:1024MB:10GB:10Mbps, server.example.com)"
34
- }
35
- ]
@@ -1,3 +0,0 @@
1
- {
2
- "id":"1"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "task_id": "14"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "task_id": "15"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "pps": "1000"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "task_id": "16"
3
- }
@@ -1,26 +0,0 @@
1
- {
2
- "traffic_daily": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnC3szdUWyJy6/f2+3Wg72Lg8EjVPuhB+seWKwCtm9ylMBvZbDEgBJ1ozv8DiXg/gw==",
3
- "traffic_weekly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnC3szdUWyJy6/f2+3Wg72KMBurzWeKRYCSdVLNTmWlS77CL7eTdjTkLzJAciTTvVw==",
4
- "traffic_monthly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnC3szdUWyJy6/f2+3Wg72IJIJ2nxhWjMrwzuGGORAgwUKwQu38nWYlplg5wRxTFxA==",
5
- "traffic_yearly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnC3szdUWyJy6/f2+3Wg72JuXq2GVfc4U3IN5b1ttsu/77CL7eTdjTkLzJAciTTvVw==",
6
- "memory_daily": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fvgG8Tmrj9pWTH4kJUZ5p8dhvV6BorRY7r4eIEWPKbhC6aUajHks7tk9UzFXwFTWWw==",
7
- "memory_weekly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fvgG8Tmrj9pWTH4kJUZ5p8coPSkAY/O804FmAbo5Fqw5MBvZbDEgBJ1ozv8DiXg/gw==",
8
- "memory_monthly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fvgG8Tmrj9pWTH4kJUZ5p8dsx6X0ZOEADT7QYB6XBaIv77CL7eTdjTkLzJAciTTvVw==",
9
- "memory_yearly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fvgG8Tmrj9pWTH4kJUZ5p8dB+gRFK17D/NMNpGQ0jL1PMBvZbDEgBJ1ozv8DiXg/gw==",
10
- "storage_daily": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99foS0JRE/SsbS3LPwnfbWpDHg8EjVPuhB+seWKwCtm9ylMBvZbDEgBJ1ozv8DiXg/gw==",
11
- "storage_weekly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99foS0JRE/SsbS3LPwnfbWpDGMBurzWeKRYCSdVLNTmWlS77CL7eTdjTkLzJAciTTvVw==",
12
- "storage_monthly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99foS0JRE/SsbS3LPwnfbWpDEJIJ2nxhWjMrwzuGGORAgwUKwQu38nWYlplg5wRxTFxA==",
13
- "storage_yearly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99foS0JRE/SsbS3LPwnfbWpDFuXq2GVfc4U3IN5b1ttsu/77CL7eTdjTkLzJAciTTvVw==",
14
- "load_daily": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnVCAeEd38I5tKGzFA/vKFWpce72OLQsGNBKIlyaI3VPRJcniVrpCjj+A47DMwkyfQ==",
15
- "load_weekly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnVCAeEd38I5tKGzFA/vKFUneWoB3RXynYY1Os3r4nqJ1/FtFwPGQkKJH2lwumDXzw==",
16
- "load_monthly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnVCAeEd38I5tKGzFA/vKFWZS471Ezj3JICAK6b/LIQF6aUajHks7tk9UzFXwFTWWw==",
17
- "load_yearly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnVCAeEd38I5tKGzFA/vKFXMoKXdsdQEoYOkY4Ri3oJi1/FtFwPGQkKJH2lwumDXzw==",
18
- "io_daily": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fg/wdjDpwrAo65UaYdgO5Q4AISmB1PxslqPs64YrzSM9IPEGYc9YIvamuCNPzknHrg==",
19
- "io_weekly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fnj1ZiSpBuBW3ioC9pzr2JFu+xwrNLSPGuEdd3BcqCJrO+CCnnFdRpsyRaXqzzOvbA==",
20
- "io_monthly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fiNJIR4KyNN6HP6Q+4c6IP7/PLCBg5OEa7Yy6ZAUUmTERJcniVrpCjj+A47DMwkyfQ==",
21
- "io_yearly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fhz6dgmYsgCwoseMpVHU2LliI5dwBut6KqqQFsscRqGcO+CCnnFdRpsyRaXqzzOvbA==",
22
- "cpu_daily": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fqhNaiflbCcb6QuGzlRJ9yzb+vWgad6b+QP6lyFG5rCcO+CCnnFdRpsyRaXqzzOvbA==",
23
- "cpu_weekly": "//stats.serveriai.lt/graph.php?Ds252x",
24
- "cpu_monthly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fqhNaiflbCcb6QuGzlRJ9yxK/MZyMfdX4eflJC8xIf8j1/FtFwPGQkKJH2lwumDXzw==",
25
- "cpu_yearly": "//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fqhNaiflbCcb6QuGzlRJ9yxZA7jroJOYQwMT3OKsz00xRJcniVrpCjj+A47DMwkyfQ=="
26
- }
@@ -1,30 +0,0 @@
1
- {
2
- "se_id": "3",
3
- "se_created": "2013-02-02 12:12:12",
4
- "se_since": "2013-02-02",
5
- "se_until": "2013-03-02",
6
- "se_quantity": "1",
7
- "se_price": "10.00",
8
- "se_discount": "0",
9
- "se_unit": "mėn.",
10
- "se_description": "Serverio nuoma (planas 1GHz:1024MB:10GB:10Mbps, server.example.com)",
11
- "se_plan": "1GHz:1048MB:10GB:10Mbps",
12
- "se_domain": "server.example.com",
13
- "se_cpu": "1",
14
- "se_ram": "1024",
15
- "se_quota": "10",
16
- "se_bandwidth": "10",
17
- "se_info": {
18
- "in_node": "Robinija",
19
- "in_host": "server.example.com",
20
- "in_bw_in": "37590",
21
- "in_bw_out": "90048",
22
- "in_qt_limit": "100352",
23
- "in_qt_usage": "17432",
24
- "in_inodes_limit": "1960000",
25
- "in_inodes_usage": "116232",
26
- "in_mm_limit": "2048",
27
- "in_mm_usage": "1297",
28
- "in_ips": "12.23.34.45"
29
- }
30
- }
@@ -1,4 +0,0 @@
1
- {
2
- "ip": "1.2.3.4",
3
- "target_id": 123
4
- }
@@ -1,132 +0,0 @@
1
- {
2
- "centos-5-x86": {
3
- "title": "CentOS 5",
4
- "arch": "32-bit",
5
- "url": "http://www.centos.org/"
6
- },
7
- "centos-5-x86_64": {
8
- "title": "CentOS 5",
9
- "url": "http://www.centos.org/",
10
- "arch": "64-bit"
11
- },
12
- "centos-6-x86": {
13
- "title": "CentOS 6",
14
- "arch": "32-bit",
15
- "url": "http://www.centos.org/"
16
- },
17
- "centos-6-x86_64": {
18
- "url": "http://www.centos.org/",
19
- "arch": "64-bit",
20
- "title": "CentOS 6"
21
- },
22
- "centos-6-x86_64-webmin": {
23
- "min_ram": "2048",
24
- "panel": "yes",
25
- "title": "Webmin 1.5 (CentOS 6, PHP 5.3)",
26
- "url": "http://forumas.dedikuoti.lt/showthread.php?p=139",
27
- "arch": "64-bit"
28
- },
29
- "debian-6.0-x86_64-ispconfig": {
30
- "min_ram": "2048",
31
- "url": "http://forumas.dedikuoti.lt/showthread.php?p=158",
32
- "title": "ISPConfig 3 (Debian 6, PHP 5.3)",
33
- "panel": "yes",
34
- "arch": "64-bit"
35
- },
36
- "centos-6-x86_64-directadmin": {
37
- "arch": "64-bit",
38
- "verify": "http://tools.iv.lt/da/licence.php?ip=%s",
39
- "url": "http://forumas.dedikuoti.lt/showthread.php?p=520",
40
- "price": "99",
41
- "min_ram": "2048",
42
- "title": "DirectAdmin 1.4",
43
- "panel": "yes"
44
- },
45
- "centos-6-x86_64-cs-1.6": {
46
- "title": "Counter-Strike 1.6",
47
- "arch": "64-bit",
48
- "panel": "yes",
49
- "url": "http://forumas.dedikuoti.lt/showthread.php?p=580",
50
- "min_ram": "2048"
51
- },
52
- "debian-5.0-x86": {
53
- "title": "Debian 5",
54
- "arch": "32-bit",
55
- "url": "http://www.debian.org/"
56
- },
57
- "debian-5.0-x86_64": {
58
- "title": "Debian 5",
59
- "arch": "64-bit",
60
- "url": "http://www.debian.org/"
61
- },
62
- "debian-6.0-x86": {
63
- "arch": "32-bit",
64
- "title": "Debian 6",
65
- "url": "http://www.debian.org/"
66
- },
67
- "debian-6.0-x86_64": {
68
- "title": "Debian 6",
69
- "url": "http://www.debian.org/",
70
- "arch": "64-bit"
71
- },
72
- "fedora-15-x86": {
73
- "arch": "32-bit",
74
- "title": "Fedora 15",
75
- "url": "http://fedoraproject.org/"
76
- },
77
- "fedora-15-x86_64": {
78
- "arch": "64-bit",
79
- "url": "http://fedoraproject.org/",
80
- "title": "Fedora 15"
81
- },
82
- "suse-11.3-x86": {
83
- "url": "http://www.opensuse.org/",
84
- "arch": "32-bit",
85
- "title": "openSUSE 11.3"
86
- },
87
- "suse-11.3-x86_64": {
88
- "title": "openSUSE 11.3",
89
- "arch": "64-bit",
90
- "url": "http://www.opensuse.org/"
91
- },
92
- "suse-11.4-x86": {
93
- "url": "http://www.opensuse.org/",
94
- "arch": "32-bit",
95
- "title": "openSUSE 11.4"
96
- },
97
- "suse-11.4-x86_64": {
98
- "arch": "64-bit",
99
- "title": "openSUSE 11.4",
100
- "url": "http://www.opensuse.org/"
101
- },
102
- "ubuntu-10.04-x86": {
103
- "title": "Ubuntu 10.04",
104
- "arch": "32-bit",
105
- "url": "http://www.ubuntu.com/"
106
- },
107
- "ubuntu-10.04-x86_64": {
108
- "url": "http://www.ubuntu.com/",
109
- "title": "Ubuntu 10.04",
110
- "arch": "64-bit"
111
- },
112
- "ubuntu-11.10-x86": {
113
- "title": "Ubuntu 11.10",
114
- "url": "http://www.ubuntu.com/",
115
- "arch": "32-bit"
116
- },
117
- "ubuntu-11.10-x86_64": {
118
- "title": "Ubuntu 11.10",
119
- "url": "http://www.ubuntu.com/",
120
- "arch": "64-bit"
121
- },
122
- "ubuntu-12.04-x86": {
123
- "arch": "32-bit",
124
- "title": "Ubuntu 12.04",
125
- "url": "http://www.ubuntu.com/"
126
- },
127
- "ubuntu-12.04-x86_64": {
128
- "url": "http://www.ubuntu.com/",
129
- "title": "Ubuntu 12.04",
130
- "arch": "64-bit"
131
- }
132
- }
@@ -1,4 +0,0 @@
1
- {
2
- "ip": "1.2.3.4",
3
- "domain": "example.com"
4
- }
@@ -1,3 +0,0 @@
1
- {
2
- "task_id": "11"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "task_id": "12"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "task_id": "13"
3
- }
@@ -1,14 +0,0 @@
1
- [
2
- {
3
- "ta_id": "1",
4
- "ta_activated": "2013-04-04 04:04:04",
5
- "ta_assigned": "2013-04-04 04:04:08",
6
- "ta_completed": "2013-04-04 04:04:12",
7
- "ta_command": "server_recreate",
8
- "ta_params": {
9
- "domain": "server.example.com",
10
- "os": "debian-6.0-x86_64"
11
- },
12
- "ta_results": "Stopping container ...\nContainer was stopped\nContainer is unmounted\nDestroying container private area: /vz/private/11\nContainer private area was destroyed\nCreating container private area (debian-6.0-x86_64)\nPerforming postcreate actions\nCT configuration saved to /etc/vz/conf/1.conf\nContainer private area was created\nStarting container...\nContainer is mounted\nContainer start in progress...\nKilling container ...\nContainer was stopped\nContainer is unmounted\nCT configuration saved to /etc/vz/conf/1.conf\nCT configuration saved to /etc/vz/conf/1.conf\nStarting container...\nContainer is mounted\nAdding IP address(es): 12.23.34.45\nSetting CPU limit: 0\nSetting CPU units: 200\nSetting CPUs: 1\nContainer start in progress...\n\nID: 1\nHost: server.example.com\nBandwidth: 10240 Kbps\nQuota: 10 GB\nCPU: 1 unit(s)\nRAM: 1024 MB\nIP: 12.23.34.45\nPassword: secret"
13
- }
14
- ]
@@ -1,3 +0,0 @@
1
- {
2
- "version":"0.1"
3
- }
@@ -1,95 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Ivapi::Client::Account do
4
- before(:each) do
5
- Ivapi.configure do |config|
6
- config.username = 'foo'
7
- config.password = 'bar'
8
- end
9
- end
10
-
11
- after(:each) do
12
- Ivapi.reset!
13
- end
14
-
15
- describe 'account information' do
16
- before(:each) do
17
- stub_command('account_info')
18
- .to_return(json_response('account_info.json'))
19
- @info = Ivapi.account.information
20
- end
21
-
22
- it 'should return account name' do
23
- expect(@info.name).to eq('Name Surname')
24
- end
25
-
26
- it 'has alias info' do
27
- expect(Ivapi.account.info).to eq(Ivapi.account.information)
28
- end
29
- end
30
-
31
- describe 'account credits' do
32
- before(:each) do
33
- stub_command('account_credits', count: 10)
34
- .to_return(json_response('account_credits.json'))
35
- @account_orders = Ivapi.account.credits
36
- end
37
-
38
- it 'should return correct credits count' do
39
- expect(@account_orders.count).to eq(0)
40
- end
41
- end
42
-
43
- describe 'account orders' do
44
- before(:each) do
45
- stub_command('account_orders')
46
- .to_return(json_response('account_orders.json'))
47
- @account_orders = Ivapi.account.orders
48
- @order = @account_orders.first
49
- end
50
-
51
- it 'should return correct orders count' do
52
- expect(@account_orders.count).to eq(3)
53
- end
54
-
55
- it 'should return order cost' do
56
- expect(@order.cost).to eq('11.11')
57
- end
58
- end
59
-
60
- describe 'account services' do
61
- before(:each) do
62
- stub_command('account_services')
63
- .to_return(json_response('account_services.json'))
64
- @account_services = Ivapi.account.services
65
- @service = @account_services.first
66
- end
67
-
68
- it 'should return correct services count' do
69
- expect(@account_services.count).to eq(3)
70
- end
71
-
72
- it 'should return service description' do
73
- expect(@service.description)
74
- .to eq('Adreso metinis mokestis (example.com)')
75
- end
76
- end
77
-
78
- describe 'account bonuses' do
79
- before(:each) do
80
- stub_command('account_bonuses', count: 10)
81
- .to_return(json_response('account_bonuses.json'))
82
- @account_bonuses = Ivapi.account.bonuses
83
- @bonus = @account_bonuses[2]
84
- end
85
-
86
- it 'should return correct bonuses count' do
87
- expect(@account_bonuses.count).to eq(3)
88
- end
89
-
90
- it 'should return bonus description' do
91
- expect(@bonus.description)
92
- .to eq('SMS +370.61234569 (example)')
93
- end
94
- end
95
- end