Commit 84d866ba authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Rename board_filter_label references to board_label

parent b725c908
class BoardFilterLabel < ActiveRecord::Base class BoardLabel < ActiveRecord::Base
belongs_to :board belongs_to :board
belongs_to :label belongs_to :label
......
...@@ -7,8 +7,8 @@ module EE ...@@ -7,8 +7,8 @@ module EE
belongs_to :milestone belongs_to :milestone
belongs_to :assignee, class_name: 'User' belongs_to :assignee, class_name: 'User'
has_many :board_filter_labels has_many :board_labels
has_many :labels, through: :board_filter_labels has_many :labels, through: :board_labels
validates :name, presence: true validates :name, presence: true
validates :group, presence: true, unless: :project validates :group, presence: true, unless: :project
......
FactoryGirl.define do FactoryGirl.define do
factory :board_filter_label do factory :board_label do
association :board association :board
association :label association :label
end end
......
...@@ -5,8 +5,8 @@ describe Board do ...@@ -5,8 +5,8 @@ describe Board do
it { is_expected.to belong_to(:project) } it { is_expected.to belong_to(:project) }
it { is_expected.to belong_to(:milestone) } it { is_expected.to belong_to(:milestone) }
it { is_expected.to belong_to(:assignee).class_name('User') } it { is_expected.to belong_to(:assignee).class_name('User') }
it { is_expected.to have_many(:board_filter_labels) } it { is_expected.to have_many(:board_labels) }
it { is_expected.to have_many(:labels).through(:board_filter_labels) } it { is_expected.to have_many(:labels).through(:board_labels) }
it { is_expected.to have_many(:lists).order(list_type: :asc, position: :asc).dependent(:delete_all) } it { is_expected.to have_many(:lists).order(list_type: :asc, position: :asc).dependent(:delete_all) }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment