Sha256: f0e3ee1b8e11fd4f9b0591b7ca5e05cd916c7b714c2d5eac44d650b3c20ce94e
Contents?: true
Size: 1.11 KB
Versions: 13
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' describe BreadcrumbsHelper 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
13 entries across 13 versions & 1 rubygems