tutter 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +1 -1
- data/spec/tutter_spec.rb +11 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c3af3d72e80522559479e901e554d54727db4c8
|
4
|
+
data.tar.gz: f5baa5e1aa489753ce10d8d8b92df38d0fa166ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10fba3cc04492dc352810fa7ac9166b7fd848ff3db51e84f1847cd48fb696450594a643eb5614167d82c496e8ffe5898fb2439e72acf759a0d266d91503a15bd
|
7
|
+
data.tar.gz: 0c4b1682972c71c0094e31197458d059ab30d95f3ebefe6bae62f9331f27021d4baa86cde7925f82856acd94e634e34369fa485a701a865c6c636558b2b8f500
|
data/.gemspec
CHANGED
data/spec/tutter_spec.rb
CHANGED
@@ -3,30 +3,30 @@ require 'json'
|
|
3
3
|
|
4
4
|
describe 'tutter' do
|
5
5
|
|
6
|
-
it '
|
6
|
+
it 'expect complain about missing project in settings' do
|
7
7
|
post '/', params=JSON.generate({'repository' => {'full_name' => '404'}}), {'HTTP_X_GITHUB_EVENT' => 'fake'}
|
8
|
-
last_response.body
|
9
|
-
last_response.status
|
8
|
+
expect { last_response.body match /Project does not exist in tutter.conf/ }
|
9
|
+
expect { last_response.status == 404 }
|
10
10
|
end
|
11
11
|
|
12
|
-
it '
|
12
|
+
it 'expect complain about POST data not being JSON' do
|
13
13
|
post '/', params={'broken' => 'data'}, {'HTTP_X_GITHUB_EVENT' => 'fake'}
|
14
|
-
last_response.body
|
15
|
-
last_response.status
|
14
|
+
expect { last_response.body match /POST data is not JSON/ }
|
15
|
+
expect { last_response.status == 400 }
|
16
16
|
end
|
17
17
|
|
18
|
-
it '
|
18
|
+
it 'expect return documentation URL' do
|
19
19
|
get '/'
|
20
|
-
last_response.body
|
20
|
+
expect { last_response.body match /Source code and documentation/ }
|
21
21
|
end
|
22
22
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe 'tutter Hello action' do
|
26
|
-
it '
|
26
|
+
it 'expect complain about invalid credentials' do
|
27
27
|
data = IO.read('spec/fixtures/new_issue.json')
|
28
28
|
post '/', params=data, {'HTTP_X_GITHUB_EVENT' => 'fake'}
|
29
|
-
last_response.body
|
30
|
-
last_response.status
|
29
|
+
expect { last_response.body match /Authorization to JHaals\/testing failed, please verify your access token/ }
|
30
|
+
expect { last_response.status == 401 }
|
31
31
|
end
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tutter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Haals
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|