require'spec_helper'describeLabelPriority,models: truedodescribe'relationships'doit{is_expected.tobelong_to(:project)}it{is_expected.tobelong_to(:label)}enddescribe'validations'doit{is_expected.tovalidate_presence_of(:project)}it{is_expected.tovalidate_presence_of(:label)}it{is_expected.tovalidate_presence_of(:priority)}it{is_expected.tovalidate_numericality_of(:priority).only_integer.is_greater_than_or_equal_to(0)}it'validates uniqueness of label_id scoped to project_id'docreate(:label_priority)expect(subject).tovalidate_uniqueness_of(:label_id).scoped_to(:project_id)endendend