arkaan 0.8.9 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/arkaan/specs.rb +24 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 307e2d6069e3590e31e8bbb4d99bfe89feee56af
4
- data.tar.gz: 9cdcd6a5e096bf414b3cd59996de31a12befcd7d
3
+ metadata.gz: 5088b21f44e4d7a4185105483eee9d51a0f88588
4
+ data.tar.gz: 1028f84176a4b83d9357522ab0b089649b3cbb80
5
5
  SHA512:
6
- metadata.gz: 507a5048c7f777d9cc7e516b672109f05e574dc615695ab250b485b475f10af7568f29461d709a973859b6480c3934c7264e67a51708f51d569dc13c9ff730db
7
- data.tar.gz: a31af0a0ea002429fcd45075f04a089125ece822f1dccd335968ccc1c3445a87bb7bcf1563b739037c2af61865bad04082d941c563206c94c7072075ed83d505
6
+ metadata.gz: 852ffa0bda4d725f05a118272c8cdbb3b605e6ea415dc46a3acabf6bf73d9af301034f301c66628182fc59c229c715dc0b177bfa18f7c8584498239a61f8bf45
7
+ data.tar.gz: 0cdc180f626d98c54b1ac3a2e7b61a04470159b2ce597a2f3649feee6e6ba85ff553d64611b43c7e3ec5a60bf204e920a36101815b968955897cf0a8a75dbcbd
@@ -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({'message' => 'missing.token'})
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({'message' => 'missing.app_key'})
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({'message' => 'application_not_found'})
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({'message' => 'gateway_not_found'})
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arkaan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.9
4
+ version: 0.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois