strong_form 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/spec/examples.txt CHANGED
@@ -1,59 +1,61 @@
1
1
  example_id | status | run_time |
2
2
  ------------------------------------------------ | ------ | --------------- |
3
- ./spec/features/strong_form_spec.rb[1:1:1:1] | passed | 0.00655 seconds |
4
- ./spec/features/strong_form_spec.rb[1:1:1:2] | passed | 0.00308 seconds |
5
- ./spec/features/strong_form_spec.rb[1:1:1:3] | passed | 0.00439 seconds |
6
- ./spec/features/strong_form_spec.rb[1:1:1:4] | passed | 0.00386 seconds |
7
- ./spec/features/strong_form_spec.rb[1:1:2:1] | passed | 0.00341 seconds |
8
- ./spec/features/strong_form_spec.rb[1:1:2:2] | passed | 0.00578 seconds |
9
- ./spec/features/strong_form_spec.rb[1:1:2:3] | passed | 0.00334 seconds |
10
- ./spec/features/strong_form_spec.rb[1:1:2:4] | passed | 0.00591 seconds |
11
- ./spec/features/strong_form_spec.rb[1:2:1:1:1] | passed | 0.00896 seconds |
12
- ./spec/features/strong_form_spec.rb[1:2:1:1:2] | passed | 0.00656 seconds |
13
- ./spec/features/strong_form_spec.rb[1:2:1:1:3] | passed | 0.00607 seconds |
14
- ./spec/features/strong_form_spec.rb[1:2:1:1:4] | passed | 0.00788 seconds |
15
- ./spec/features/strong_form_spec.rb[1:2:1:1:5] | passed | 0.00578 seconds |
16
- ./spec/features/strong_form_spec.rb[1:2:1:1:6] | passed | 0.00703 seconds |
17
- ./spec/features/strong_form_spec.rb[1:2:2:1:1] | passed | 0.00774 seconds |
18
- ./spec/features/strong_form_spec.rb[1:2:2:1:2] | passed | 0.01086 seconds |
19
- ./spec/features/strong_form_spec.rb[1:2:2:1:3] | passed | 0.00917 seconds |
20
- ./spec/features/strong_form_spec.rb[1:2:2:1:4] | passed | 0.00534 seconds |
21
- ./spec/features/strong_form_spec.rb[1:2:2:2:1] | passed | 0.00764 seconds |
22
- ./spec/features/strong_form_spec.rb[1:2:2:2:2] | passed | 0.00817 seconds |
23
- ./spec/features/strong_form_spec.rb[1:2:3:1:1] | passed | 0.00607 seconds |
24
- ./spec/features/strong_form_spec.rb[1:2:3:1:2] | passed | 0.00773 seconds |
25
- ./spec/features/strong_form_spec.rb[1:2:3:1:3] | passed | 0.00717 seconds |
26
- ./spec/features/strong_form_spec.rb[1:2:3:1:4] | passed | 0.00912 seconds |
27
- ./spec/features/strong_form_spec.rb[1:2:3:2:1] | passed | 0.00828 seconds |
28
- ./spec/features/strong_form_spec.rb[1:2:3:2:2] | passed | 0.00721 seconds |
29
- ./spec/features/strong_form_spec.rb[1:3:1] | passed | 0.03545 seconds |
30
- ./spec/features/strong_form_spec.rb[1:3:2] | passed | 0.00715 seconds |
31
- ./spec/features/strong_form_spec.rb[1:3:3] | passed | 0.00931 seconds |
32
- ./spec/features/strong_form_spec.rb[1:3:4] | passed | 0.00776 seconds |
33
- ./spec/features/strong_form_spec.rb[1:4:1:1:1] | passed | 0.0068 seconds |
34
- ./spec/features/strong_form_spec.rb[1:4:1:1:2] | passed | 0.00633 seconds |
35
- ./spec/features/strong_form_spec.rb[1:4:2:1:1] | passed | 0.00685 seconds |
36
- ./spec/features/strong_form_spec.rb[1:4:2:1:2] | passed | 0.16583 seconds |
37
- ./spec/features/strong_form_spec.rb[1:5:1] | passed | 0.01251 seconds |
38
- ./spec/features/strong_form_spec.rb[1:5:2:1:1:1] | passed | 0.01515 seconds |
39
- ./spec/features/strong_form_spec.rb[1:5:2:1:1:2] | passed | 0.00953 seconds |
40
- ./spec/features/strong_form_spec.rb[1:5:2:1:2:1] | passed | 0.00711 seconds |
41
- ./spec/features/strong_form_spec.rb[1:5:2:1:2:2] | passed | 0.01182 seconds |
42
- ./spec/features/strong_form_spec.rb[1:5:2:1:3] | passed | 0.01622 seconds |
43
- ./spec/features/strong_form_spec.rb[1:5:2:2:1] | passed | 0.00851 seconds |
44
- ./spec/features/strong_form_spec.rb[1:5:3:1:1] | passed | 0.00737 seconds |
45
- ./spec/features/strong_form_spec.rb[1:5:3:1:2] | passed | 0.00876 seconds |
46
- ./spec/features/strong_form_spec.rb[1:5:3:2:1] | passed | 0.00668 seconds |
47
- ./spec/features/strong_form_spec.rb[1:5:4:1:1] | passed | 0.01253 seconds |
48
- ./spec/features/strong_form_spec.rb[1:5:4:1:2] | passed | 0.01524 seconds |
49
- ./spec/features/strong_form_spec.rb[1:5:4:1:3] | passed | 0.0175 seconds |
50
- ./spec/features/strong_form_spec.rb[1:5:4:1:4] | passed | 0.01156 seconds |
51
- ./spec/features/strong_form_spec.rb[1:5:4:1:5] | passed | 0.00751 seconds |
52
- ./spec/features/strong_form_spec.rb[1:5:4:1:6] | passed | 0.0106 seconds |
53
- ./spec/features/strong_form_spec.rb[1:5:4:2:1] | passed | 0.01105 seconds |
54
- ./spec/features/strong_form_spec.rb[1:5:5:1:1] | passed | 0.00856 seconds |
55
- ./spec/models/user_spec.rb[1:1:1:1] | passed | 0.00038 seconds |
56
- ./spec/models/user_spec.rb[1:1:2:1] | passed | 0.00517 seconds |
57
- ./spec/models/user_spec.rb[1:1:2:2] | passed | 0.00038 seconds |
58
- ./spec/models/user_spec.rb[1:1:2:3] | passed | 0.00046 seconds |
3
+ ./spec/features/strong_form_spec.rb[1:1:1:1] | passed | 0.01067 seconds |
4
+ ./spec/features/strong_form_spec.rb[1:1:1:2] | passed | 0.00616 seconds |
5
+ ./spec/features/strong_form_spec.rb[1:1:1:3] | passed | 0.00511 seconds |
6
+ ./spec/features/strong_form_spec.rb[1:1:1:4] | passed | 0.00667 seconds |
7
+ ./spec/features/strong_form_spec.rb[1:1:1:5] | passed | 0.00572 seconds |
8
+ ./spec/features/strong_form_spec.rb[1:1:2:1] | passed | 0.00559 seconds |
9
+ ./spec/features/strong_form_spec.rb[1:1:2:2] | passed | 0.0087 seconds |
10
+ ./spec/features/strong_form_spec.rb[1:1:2:3] | passed | 0.00777 seconds |
11
+ ./spec/features/strong_form_spec.rb[1:1:2:4] | passed | 0.00573 seconds |
12
+ ./spec/features/strong_form_spec.rb[1:1:2:5] | passed | 0.00687 seconds |
13
+ ./spec/features/strong_form_spec.rb[1:2:1:1:1] | passed | 0.01619 seconds |
14
+ ./spec/features/strong_form_spec.rb[1:2:1:1:2] | passed | 0.00673 seconds |
15
+ ./spec/features/strong_form_spec.rb[1:2:1:1:3] | passed | 0.01024 seconds |
16
+ ./spec/features/strong_form_spec.rb[1:2:1:1:4] | passed | 0.00664 seconds |
17
+ ./spec/features/strong_form_spec.rb[1:2:1:1:5] | passed | 0.00915 seconds |
18
+ ./spec/features/strong_form_spec.rb[1:2:1:1:6] | passed | 0.02026 seconds |
19
+ ./spec/features/strong_form_spec.rb[1:2:2:1:1] | passed | 0.00704 seconds |
20
+ ./spec/features/strong_form_spec.rb[1:2:2:1:2] | passed | 0.00783 seconds |
21
+ ./spec/features/strong_form_spec.rb[1:2:2:1:3] | passed | 0.01374 seconds |
22
+ ./spec/features/strong_form_spec.rb[1:2:2:1:4] | passed | 0.00728 seconds |
23
+ ./spec/features/strong_form_spec.rb[1:2:2:2:1] | passed | 0.01156 seconds |
24
+ ./spec/features/strong_form_spec.rb[1:2:2:2:2] | passed | 0.00947 seconds |
25
+ ./spec/features/strong_form_spec.rb[1:2:3:1:1] | passed | 0.00916 seconds |
26
+ ./spec/features/strong_form_spec.rb[1:2:3:1:2] | passed | 0.00793 seconds |
27
+ ./spec/features/strong_form_spec.rb[1:2:3:1:3] | passed | 0.01403 seconds |
28
+ ./spec/features/strong_form_spec.rb[1:2:3:1:4] | passed | 0.02731 seconds |
29
+ ./spec/features/strong_form_spec.rb[1:2:3:2:1] | passed | 0.01094 seconds |
30
+ ./spec/features/strong_form_spec.rb[1:2:3:2:2] | passed | 0.00922 seconds |
31
+ ./spec/features/strong_form_spec.rb[1:3:1] | passed | 0.16025 seconds |
32
+ ./spec/features/strong_form_spec.rb[1:3:2] | passed | 0.00584 seconds |
33
+ ./spec/features/strong_form_spec.rb[1:3:3] | passed | 0.00594 seconds |
34
+ ./spec/features/strong_form_spec.rb[1:3:4] | passed | 0.00676 seconds |
35
+ ./spec/features/strong_form_spec.rb[1:4:1:1:1] | passed | 0.01197 seconds |
36
+ ./spec/features/strong_form_spec.rb[1:4:1:1:2] | passed | 0.01235 seconds |
37
+ ./spec/features/strong_form_spec.rb[1:4:2:1:1] | passed | 0.00929 seconds |
38
+ ./spec/features/strong_form_spec.rb[1:4:2:1:2] | passed | 0.01231 seconds |
39
+ ./spec/features/strong_form_spec.rb[1:5:1] | passed | 0.00973 seconds |
40
+ ./spec/features/strong_form_spec.rb[1:5:2:1:1:1] | passed | 0.00835 seconds |
41
+ ./spec/features/strong_form_spec.rb[1:5:2:1:1:2] | passed | 0.00739 seconds |
42
+ ./spec/features/strong_form_spec.rb[1:5:2:1:2:1] | passed | 0.00579 seconds |
43
+ ./spec/features/strong_form_spec.rb[1:5:2:1:2:2] | passed | 0.00627 seconds |
44
+ ./spec/features/strong_form_spec.rb[1:5:2:1:3] | passed | 0.00795 seconds |
45
+ ./spec/features/strong_form_spec.rb[1:5:2:2:1] | passed | 0.00992 seconds |
46
+ ./spec/features/strong_form_spec.rb[1:5:3:1:1] | passed | 0.00913 seconds |
47
+ ./spec/features/strong_form_spec.rb[1:5:3:1:2] | passed | 0.00641 seconds |
48
+ ./spec/features/strong_form_spec.rb[1:5:3:2:1] | passed | 0.00704 seconds |
49
+ ./spec/features/strong_form_spec.rb[1:5:4:1:1] | passed | 0.00964 seconds |
50
+ ./spec/features/strong_form_spec.rb[1:5:4:1:2] | passed | 0.00954 seconds |
51
+ ./spec/features/strong_form_spec.rb[1:5:4:1:3] | passed | 0.00599 seconds |
52
+ ./spec/features/strong_form_spec.rb[1:5:4:1:4] | passed | 0.00598 seconds |
53
+ ./spec/features/strong_form_spec.rb[1:5:4:1:5] | passed | 0.0079 seconds |
54
+ ./spec/features/strong_form_spec.rb[1:5:4:1:6] | passed | 0.00813 seconds |
55
+ ./spec/features/strong_form_spec.rb[1:5:4:2:1] | passed | 0.00759 seconds |
56
+ ./spec/features/strong_form_spec.rb[1:5:5:1:1] | passed | 0.01743 seconds |
57
+ ./spec/models/user_spec.rb[1:1:1:1] | passed | 0.00037 seconds |
58
+ ./spec/models/user_spec.rb[1:1:2:1] | passed | 0.00039 seconds |
59
+ ./spec/models/user_spec.rb[1:1:2:2] | passed | 0.00567 seconds |
60
+ ./spec/models/user_spec.rb[1:1:2:3] | passed | 0.00045 seconds |
59
61
  ./spec/models/user_spec.rb[1:1:2:4] | passed | 0.00038 seconds |
@@ -1,7 +1,7 @@
1
1
  require 'rails_helper'
2
2
 
3
3
  def all_user_attributes
4
- %i(first_name last_name gender description)
4
+ %i(first_name last_name gender description roles)
5
5
  end
6
6
 
7
7
  def all_addresses_attributes
@@ -31,13 +31,13 @@ RSpec.describe 'strong form' do
31
31
  before(:each) do
32
32
  new_user = User.new
33
33
  allow(User).to receive(:new) do
34
- new_user.permitted_attributes = [:last_name]
34
+ new_user.permitted_attributes = [:last_name, roles: []]
35
35
  new_user
36
36
  end
37
37
  subject
38
38
  end
39
39
 
40
- (all_user_attributes - %i(last_name)).each do |attr|
40
+ (all_user_attributes - %i(last_name roles)).each do |attr|
41
41
  it "should disable #{attr}" do
42
42
  expect(page.find('[name="user[' + attr.to_s + ']"]')[:disabled])
43
43
  .to be_truthy
@@ -48,6 +48,11 @@ RSpec.describe 'strong form' do
48
48
  expect(page.find('[name="user[last_name]"]')[:disabled])
49
49
  .to be_falsy
50
50
  end
51
+
52
+ it 'should enable roles' do
53
+ expect(page.find('[name="user[roles]"]')[:disabled])
54
+ .to be_falsy
55
+ end
51
56
  end
52
57
  end
53
58
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strong_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Doits
@@ -174,6 +174,7 @@ files:
174
174
  - spec/dummy/db/migrate/20150626095843_create_users.rb
175
175
  - spec/dummy/db/migrate/20150626104120_create_addresses.rb
176
176
  - spec/dummy/db/migrate/20150626132542_create_tags.rb
177
+ - spec/dummy/db/migrate/20151116150723_add_roles_to_users.rb
177
178
  - spec/dummy/db/schema.rb
178
179
  - spec/dummy/db/test.sqlite3
179
180
  - spec/dummy/log/development.log
@@ -296,6 +297,7 @@ test_files:
296
297
  - spec/dummy/db/migrate/20150626095843_create_users.rb
297
298
  - spec/dummy/db/migrate/20150626104120_create_addresses.rb
298
299
  - spec/dummy/db/migrate/20150626132542_create_tags.rb
300
+ - spec/dummy/db/migrate/20151116150723_add_roles_to_users.rb
299
301
  - spec/dummy/db/schema.rb
300
302
  - spec/dummy/db/test.sqlite3
301
303
  - spec/dummy/log/development.log