Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/models/group_spec.rb2
-rw-r--r--spec/models/milestone_spec.rb2
-rw-r--r--spec/models/protected_branch_spec.rb2
-rw-r--r--spec/models/snippet_spec.rb4
-rw-r--r--spec/models/users_project_spec.rb4
-rw-r--r--spec/models/wiki_spec.rb2
-rw-r--r--spec/roles/issue_commonality_spec.rb4
7 files changed, 10 insertions, 10 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index fd7db4b25d9..5ae40658823 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -20,5 +20,5 @@ describe Group do
it { should validate_uniqueness_of(:name) }
it { should validate_presence_of :code }
it { should validate_uniqueness_of(:code) }
- it { should validate_presence_of :owner_id }
+ it { should validate_presence_of :owner }
end
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb
index 9c11a7b1043..ef50e012722 100644
--- a/spec/models/milestone_spec.rb
+++ b/spec/models/milestone_spec.rb
@@ -12,7 +12,7 @@ describe Milestone do
describe "Validation" do
it { should validate_presence_of(:title) }
- it { should validate_presence_of(:project_id) }
+ it { should validate_presence_of(:project) }
it { should ensure_inclusion_of(:closed).in_array([true, false]) }
end
diff --git a/spec/models/protected_branch_spec.rb b/spec/models/protected_branch_spec.rb
index 4b2923624dd..c6b09f358fb 100644
--- a/spec/models/protected_branch_spec.rb
+++ b/spec/models/protected_branch_spec.rb
@@ -10,7 +10,7 @@ describe ProtectedBranch do
end
describe 'Validation' do
- it { should validate_presence_of(:project_id) }
+ it { should validate_presence_of(:project) }
it { should validate_presence_of(:name) }
end
diff --git a/spec/models/snippet_spec.rb b/spec/models/snippet_spec.rb
index 66c36e51ec7..465612e0f19 100644
--- a/spec/models/snippet_spec.rb
+++ b/spec/models/snippet_spec.rb
@@ -13,8 +13,8 @@ describe Snippet do
end
describe "Validation" do
- it { should validate_presence_of(:author_id) }
- it { should validate_presence_of(:project_id) }
+ it { should validate_presence_of(:author) }
+ it { should validate_presence_of(:project) }
it { should validate_presence_of(:title) }
it { should ensure_length_of(:title).is_within(0..255) }
diff --git a/spec/models/users_project_spec.rb b/spec/models/users_project_spec.rb
index a13a08db17a..a64ff3678bf 100644
--- a/spec/models/users_project_spec.rb
+++ b/spec/models/users_project_spec.rb
@@ -13,10 +13,10 @@ describe UsersProject do
describe "Validation" do
let!(:users_project) { create(:users_project) }
- it { should validate_presence_of(:user_id) }
+ it { should validate_presence_of(:user) }
it { should validate_uniqueness_of(:user_id).scoped_to(:project_id).with_message(/already exists/) }
- it { should validate_presence_of(:project_id) }
+ it { should validate_presence_of(:project) }
end
describe "Delegate methods" do
diff --git a/spec/models/wiki_spec.rb b/spec/models/wiki_spec.rb
index 1e27954cb84..7830c8215fc 100644
--- a/spec/models/wiki_spec.rb
+++ b/spec/models/wiki_spec.rb
@@ -16,6 +16,6 @@ describe Wiki do
it { should validate_presence_of(:title) }
it { should ensure_length_of(:title).is_within(1..250) }
it { should validate_presence_of(:content) }
- it { should validate_presence_of(:user_id) }
+ it { should validate_presence_of(:user) }
end
end
diff --git a/spec/roles/issue_commonality_spec.rb b/spec/roles/issue_commonality_spec.rb
index 77b98b46ed9..fc4114e3a77 100644
--- a/spec/roles/issue_commonality_spec.rb
+++ b/spec/roles/issue_commonality_spec.rb
@@ -11,8 +11,8 @@ describe Issue, "IssueCommonality" do
end
describe "Validation" do
- it { should validate_presence_of(:project_id) }
- it { should validate_presence_of(:author_id) }
+ it { should validate_presence_of(:project) }
+ it { should validate_presence_of(:author) }
it { should validate_presence_of(:title) }
it { should ensure_length_of(:title).is_at_least(0).is_at_most(255) }
end