require 'spec_helper'

describe Section do
  describe 'associations' do
    describe 'chapters' do
      it 'does not include HiddenGoodsNomenclatures' do
        pending
      end
    end
  end
end

require 'spec_helper'

describe Section do
  describe 'associations' do
    describe 'chapters' do
      let!(:chapter) { create(:chapter, :with_section) }

      it 'does not include HiddenGoodsNomenclatures' do
        section = chapter.section
        create(:hidden_goods_nomenclature, goods_nomenclature_item_id: chapter.goods_nomenclature_item_id)

        expect(section.chapters).to eq []
      end
    end
  end
end

Fix pending spec for section.chapters with hidden codes
Fix pending spec for section.chapters with hidden codes
