fix name scope

This commit is contained in:
zmagod 2018-02-12 09:09:56 +01:00
parent d12f8403e4
commit 36595d33f4
2 changed files with 2 additions and 2 deletions

View file

@ -10,6 +10,6 @@ class RepositoryListItem < ApplicationRecord
class_name: 'User'
validates :data,
presence: true,
uniqueness: { scope: :repository, case_sensitive: false },
uniqueness: { scope: :repository_column, case_sensitive: false },
length: { maximum: Constants::TEXT_MAX_LENGTH }
end

View file

@ -27,7 +27,7 @@ RSpec.describe RepositoryListItem, type: :model do
should validate_length_of(:data).is_at_most(Constants::TEXT_MAX_LENGTH)
end
context 'has a uniq data scoped on repository' do
context 'has a uniq data scoped on repository column' do
let!(:user) { create :user }
let!(:repository_one) { create :repository }
let!(:repository_column) do