textualize 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0004fe0730f678c98c0b08e94bd3bece7a42bf6e
4
- data.tar.gz: 60c9fd0ddbac322e698b77067bd5476dd42dbab3
3
+ metadata.gz: a9c70e32bf82b3847acd0669ec1b814445ee4898
4
+ data.tar.gz: 5ab0970e217faa054978efcfe7b46bc0ea13bf7d
5
5
  SHA512:
6
- metadata.gz: c0ecaa24c69b83455a92a2a54e4d41a8240061a53f234c014d5759d761a484cf215c549b6dcc4b6ff4f128fbded452bf6c6d9b2fbe5f3ab3cbbcb5a0ab285504
7
- data.tar.gz: 98e0b6d410a04a5d7b51e8be91a454ffb5b673badda5fdf60d6a886d80f451abaa6c1e6b72c560611966d73ab718639802dccfbb267868ffca382122ea354a5a
6
+ metadata.gz: d7a45d017e31940d406008be4b3c83256dcac42e5d368675c4d85447bba6be123551d45a1b06ad2cc46ea42d6b0f8ecadafbb99692882b301c808b52b4f5abc9
7
+ data.tar.gz: e12f11480d6153e91c2647e7d80ded150c3077c9b1bcb8de7276420e588b3b27efcea8a20237bf9bc7f371b9f54499ec88004134775408c69a4bb05e2a2751f0
@@ -3,13 +3,12 @@ require 'airborne'
3
3
  describe 'DELETE <%= url %>' do
4
4
  let!(:<%= name %>) { create(:<%= name %>) }
5
5
 
6
- before do
7
- add_header_tokens(<%= secured_by %>)
8
- end
9
-
10
- it 'returns expected json' do
11
- delete "<%= url %>"
12
- expect_status <%= response_code %>
6
+ <%= secured_by %>.each do |role|
7
+ it "returns expected json for #{role} role" do
8
+ add_header_token role
9
+ delete "<%= url %>"
10
+ expect_status <%= response_code %>
11
+ end
13
12
  end
14
13
  end
15
14
 
@@ -3,14 +3,13 @@ require 'airborne'
3
3
  describe 'GET <%= url %>' do
4
4
  let!(:<%= name %>) { create(:<%= name %>) }
5
5
 
6
- before do
7
- add_header_tokens(<%= secured_by %>)
8
- end
9
-
10
- it 'returns expected json' do
11
- get "<%= url %>"
12
- expect_status <%= response_code %>
13
- expect_json_keys <%= body.data.keys %>
6
+ <%= secured_by %>.each do |role|
7
+ it "returns expected json for #{role} role" do
8
+ add_header_token role
9
+ get "<%= url %>"
10
+ expect_status <%= response_code %>
11
+ expect_json_keys <%= body.data.keys %>
12
+ end
14
13
  end
15
14
  end
16
15
 
@@ -3,14 +3,13 @@ require 'airborne'
3
3
  describe 'GET <%= url %>' do
4
4
  let!(:<%= name %>) { create_list(:<%= name %>, 3) }
5
5
 
6
- before do
7
- add_header_tokens(<%= secured_by %>)
8
- end
9
-
10
- it 'returns expected json' do
11
- get "<%= url %>"
12
- expect_status <%= response_code %>
13
- expect_json_keys <%= body.data.sample.keys %>
6
+ <%= secured_by %>.each do |role|
7
+ it "returns expected json for #{role} role" do
8
+ add_header_token role
9
+ get "<%= url %>"
10
+ expect_status <%= response_code %>
11
+ expect_json_keys <%= body.data.sample.keys %>
12
+ end
14
13
  end
15
14
  end
16
15
 
@@ -3,12 +3,11 @@ require 'airborne'
3
3
  describe 'PATCH <%= url %>' do
4
4
  let!(:<%= name %>) { create(:<%= name %>) }
5
5
 
6
- before do
7
- add_header_tokens(<%= secured_by %>)
6
+ <%= secured_by %>.each do |role|
7
+ it "returns expected json for #{role} role" do
8
+ add_header_token role
9
+ patch "<%= url %>"
10
+ expect_status <%= response_code %>
11
+ end
8
12
  end
9
-
10
- it 'returns expected json' do
11
- patch "<%= url %>"
12
- expect_status <%= response_code %>
13
13
  end
14
-
@@ -1,19 +1,18 @@
1
1
  require 'airborne'
2
2
 
3
3
  describe 'POST <%= url %>' do
4
- before do
5
- add_header_tokens(<%= secured_by %>)
6
- end
7
4
 
8
- it 'returns the saved record' do
9
- post "<%= url %>", {
10
- <%= properties = JSON.parse(schema).fetch('properties');
11
- properties.fetch('required').map { |required_param|
12
- "\"#{required_param}\" => "\
13
- "\"#{properties.fetch(required_param).fetch('type')}\""
14
- }.join("\n") %>
15
- }
16
- expect_status <%= response_code %>
5
+ <%= secured_by %>.each do |role|
6
+ it "returns the saved record for #{role} role" do
7
+ post "<%= url %>", {
8
+ <%= properties = JSON.parse(schema).fetch('properties');
9
+ properties.fetch('required').map { |required_param|
10
+ "\"#{required_param}\" => "\
11
+ "\"#{properties.fetch(required_param).fetch('type')}\""
12
+ }.join("\n") %>
13
+ }
14
+ expect_status <%= response_code %>
15
+ end
17
16
  end
18
17
  end
19
18
 
@@ -1,3 +1,3 @@
1
1
  module Textualize
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textualize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Q-Centrix Dev Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2015-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor