feat: Category API to handle linked categories and parent-sub categories (#4879)
This commit is contained in:
@@ -9,8 +9,10 @@ RSpec.describe Category, type: :model do
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:account) }
|
||||
it { is_expected.to belong_to(:portal) }
|
||||
it { is_expected.to have_many(:folders) }
|
||||
it { is_expected.to have_many(:articles) }
|
||||
it { is_expected.to have_many(:sub_categories) }
|
||||
it { is_expected.to have_many(:linked_categories) }
|
||||
it { is_expected.to have_many(:related_categories) }
|
||||
end
|
||||
|
||||
describe 'search' do
|
||||
|
||||
8
spec/models/related_category_spec.rb
Normal file
8
spec/models/related_category_spec.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe RelatedCategory, type: :model do
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:category) }
|
||||
it { is_expected.to belong_to(:related_category) }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user