Skip to content

Commit ff11c79

Browse files
committed
Remove useless tests on Rails mass attributes
1 parent 31ef4ba commit ff11c79

7 files changed

+0
-47
lines changed

Diff for: spec/models/gitolite_public_key_spec.rb

-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ def test_user
2525

2626
subject { @ssh_key }
2727

28-
## Attributes
29-
it { is_expected.to allow_mass_assignment_of(:title) }
30-
it { is_expected.to allow_mass_assignment_of(:key) }
31-
it { is_expected.to allow_mass_assignment_of(:key_type) }
32-
it { is_expected.to allow_mass_assignment_of(:delete_when_unused) }
33-
3428
## Relations
3529
it { is_expected.to belong_to(:user) }
3630
it { is_expected.to have_many(:repository_deployment_credentials) }

Diff for: spec/models/repository_deployment_credential_spec.rb

-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ def build_deployment_credential(opts = {})
2727

2828
subject { @deployment_credential }
2929

30-
## Attributes
31-
it { should allow_mass_assignment_of(:perm) }
32-
it { should allow_mass_assignment_of(:active) }
33-
3430
## Relations
3531
it { should belong_to(:repository) }
3632
it { should belong_to(:gitolite_public_key) }

Diff for: spec/models/repository_git_config_key_spec.rb

-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66

77
subject { git_config_key }
88

9-
## Attributes
10-
it { should allow_mass_assignment_of(:type) }
11-
it { should allow_mass_assignment_of(:key) }
12-
it { should allow_mass_assignment_of(:value) }
13-
149
## Relations
1510
it { should belong_to(:repository) }
1611

Diff for: spec/models/repository_git_extra_spec.rb

-11
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@
66

77
subject { git_extra }
88

9-
## Attributes
10-
it { should allow_mass_assignment_of(:git_http) }
11-
it { should allow_mass_assignment_of(:git_daemon) }
12-
it { should allow_mass_assignment_of(:git_notify) }
13-
it { should allow_mass_assignment_of(:git_annex) }
14-
it { should allow_mass_assignment_of(:default_branch) }
15-
it { should allow_mass_assignment_of(:protected_branch) }
16-
it { should allow_mass_assignment_of(:public_repo) }
17-
it { should allow_mass_assignment_of(:key) }
18-
it { should allow_mass_assignment_of(:urls_order) }
19-
209
## Relations
2110
it { should belong_to(:repository) }
2211

Diff for: spec/models/repository_mirror_spec.rb

-8
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ def expect_valid_refspec(refspec)
4040

4141
subject { @mirror }
4242

43-
## Attributes
44-
it { should allow_mass_assignment_of(:url) }
45-
it { should allow_mass_assignment_of(:push_mode) }
46-
it { should allow_mass_assignment_of(:include_all_branches) }
47-
it { should allow_mass_assignment_of(:include_all_tags) }
48-
it { should allow_mass_assignment_of(:explicit_refspec) }
49-
it { should allow_mass_assignment_of(:active) }
50-
5143
## Relations
5244
it { should belong_to(:repository) }
5345

Diff for: spec/models/repository_post_receive_url_spec.rb

-8
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66

77
subject { post_receive_url }
88

9-
## Attributes
10-
it { should allow_mass_assignment_of(:url) }
11-
it { should allow_mass_assignment_of(:mode) }
12-
it { should allow_mass_assignment_of(:active) }
13-
it { should allow_mass_assignment_of(:use_triggers) }
14-
it { should allow_mass_assignment_of(:triggers) }
15-
it { should allow_mass_assignment_of(:split_payloads) }
16-
179
## Relations
1810
it { should belong_to(:repository) }
1911

Diff for: spec/models/repository_protected_branche_spec.rb

-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66

77
subject { protected_branch }
88

9-
## Attributes
10-
it { should allow_mass_assignment_of(:path) }
11-
it { should allow_mass_assignment_of(:permissions) }
12-
it { should allow_mass_assignment_of(:position) }
13-
149
## Relations
1510
it { should belong_to(:repository) }
1611
it { should have_many(:protected_branches_members).with_foreign_key(:protected_branch_id).dependent(:destroy) }

0 commit comments

Comments
 (0)