arkaan 0.8.9 → 0.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arkaan/specs.rb +24 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5088b21f44e4d7a4185105483eee9d51a0f88588
|
4
|
+
data.tar.gz: 1028f84176a4b83d9357522ab0b089649b3cbb80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852ffa0bda4d725f05a118272c8cdbb3b605e6ea415dc46a3acabf6bf73d9af301034f301c66628182fc59c229c715dc0b177bfa18f7c8584498239a61f8bf45
|
7
|
+
data.tar.gz: 0cdc180f626d98c54b1ac3a2e7b61a04470159b2ce597a2f3649feee6e6ba85ff553d64611b43c7e3ec5a60bf204e920a36101815b968955897cf0a8a75dbcbd
|
data/lib/arkaan/specs.rb
CHANGED
@@ -23,7 +23,12 @@ module Arkaan
|
|
23
23
|
expect(last_response.status).to be 400
|
24
24
|
end
|
25
25
|
it 'returns the correct response if the parameters do not contain a gateway token' do
|
26
|
-
expect(JSON.parse(last_response.body)).to eq({
|
26
|
+
expect(JSON.parse(last_response.body)).to eq({
|
27
|
+
'status' => 400,
|
28
|
+
'field' => 'token',
|
29
|
+
'error' => 'required',
|
30
|
+
'docs' => 'https://github.com/jdr-tools/arkaan/wiki/Errors#parameter-not-given'
|
31
|
+
})
|
27
32
|
end
|
28
33
|
end
|
29
34
|
describe 'no application key error' do
|
@@ -34,7 +39,12 @@ module Arkaan
|
|
34
39
|
expect(last_response.status).to be 400
|
35
40
|
end
|
36
41
|
it 'returns the correct response if the parameters do not contain a application key' do
|
37
|
-
expect(JSON.parse(last_response.body)).to eq({
|
42
|
+
expect(JSON.parse(last_response.body)).to eq({
|
43
|
+
'status' => 400,
|
44
|
+
'field' => 'app_key',
|
45
|
+
'error' => 'required',
|
46
|
+
'docs' => 'https://github.com/jdr-tools/arkaan/wiki/Errors#parameter-not-given'
|
47
|
+
})
|
38
48
|
end
|
39
49
|
end
|
40
50
|
end
|
@@ -47,7 +57,12 @@ module Arkaan
|
|
47
57
|
expect(last_response.status).to be 404
|
48
58
|
end
|
49
59
|
it 'returns the correct body when the gateway doesn\'t exist' do
|
50
|
-
expect(JSON.parse(last_response.body)).to eq({
|
60
|
+
expect(JSON.parse(last_response.body)).to eq({
|
61
|
+
'status' => 404,
|
62
|
+
'field' => 'token',
|
63
|
+
'error' => 'unknown',
|
64
|
+
'docs' => 'https://github.com/jdr-tools/arkaan/wiki/Errors#gateway-token-not-found'
|
65
|
+
})
|
51
66
|
end
|
52
67
|
end
|
53
68
|
describe 'gateway not found' do
|
@@ -58,7 +73,12 @@ module Arkaan
|
|
58
73
|
expect(last_response.status).to be 404
|
59
74
|
end
|
60
75
|
it 'returns the correct body when the gateway doesn\'t exist' do
|
61
|
-
expect(JSON.parse(last_response.body)).to eq({
|
76
|
+
expect(JSON.parse(last_response.body)).to eq({
|
77
|
+
'status' => 404,
|
78
|
+
'field' => 'app_key',
|
79
|
+
'error' => 'unknown',
|
80
|
+
'docs' => 'https://github.com/jdr-tools/arkaan/wiki/Errors#application-key-not-found'
|
81
|
+
})
|
62
82
|
end
|
63
83
|
end
|
64
84
|
end
|