Skip to content
Snippets Groups Projects
Commit a4cd7386 authored by Andrey Kumanyaev's avatar Andrey Kumanyaev
Browse files

tests fix

parent df7c5248
No related branches found
No related tags found
1 merge request!1656Refactoring
Loading
Loading
@@ -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
Loading
Loading
@@ -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
 
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
Loading
Loading
@@ -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) }
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment