tests fix
This commit is contained in:
parent
df7c52489a
commit
a4cd738686
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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) }
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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…
Reference in a new issue