Sha256: 76e2a381ba6e975568109f65e58ff4f19262ddb6728f4d2366f254ea7b466fed
Contents?: true
Size: 727 Bytes
Versions: 22
Compression:
Stored size: 727 Bytes
Contents
# frozen_string_literal: true require 'migration/page_language' RSpec.describe Migration::PageLanguage do describe '#migrate_pages' do let(:exhibit) { FactoryBot.create(:exhibit) } let(:page) { FactoryBot.create(:feature_page, exhibit: exhibit) } let(:slug) { FriendlyId::Slug.find(page.id) } before do # Remove the locale scope (anticipating pre translation state of scope) slug.scope = slug.scope.sub(',locale:en', '') slug.save slug.reload end it 'sets the scope to the default locale' do expect(slug.scope).not_to include(',locale:en') subject.run slug.reload expect(slug.scope).to eq "exhibit_id:#{page.exhibit.id},locale:en" end end end
Version data entries
22 entries across 22 versions & 1 rubygems