Sha256: dae221dcd98a8f0e59ea9a0c229acf05445558d9319054fd7a3180946f1426ce
Contents?: true
Size: 1.14 KB
Versions: 14
Compression:
Stored size: 1.14 KB
Contents
require 'spec_helper' describe BreadcrumbsHelper, organization_workspace: :test do helper BreadcrumbsHelper helper LinksHelper let(:breadcrumb) { breadcrumbs(exercise) } context 'exercise in complement' do let!(:complement) { create(:complement, name: 'my guide', exercises: [ create(:exercise, name: 'my exercise') ]) } let(:exercise) { complement.exercises.first } before { reindex_current_organization! } it { expect(breadcrumb).to include('my exercise') } it { expect(breadcrumb).to include('my guide') } it { expect(breadcrumb).to be_html_safe } end context 'exercise in chapter' do let!(:chapter) { create(:chapter, name: 'my chapter', lessons: [ create(:lesson, name: 'my lesson', exercises: [ create(:exercise, name: 'my exercise') ]) ]) } let(:exercise) { chapter.first_lesson.exercises.first } before { reindex_current_organization! } it { expect(breadcrumb).to include('my exercise') } it { expect(breadcrumb).to include('my lesson') } it { expect(breadcrumb).to include('my chapter') } it { expect(breadcrumb).to be_html_safe } end end
Version data entries
14 entries across 14 versions & 1 rubygems