Sha256: cf9c487346f5f6d8589166930f9bb1fc0a7c9f6bbee3371bdc3f660636934f3c

Contents?: true

Size: 818 Bytes

Versions: 13

Compression:

Stored size: 818 Bytes

Contents

require 'spec_helper'

describe 'TinyMCE Editor' do
  let(:user) { DummyUser.new }

  before do
    user.update(alchemy_roles: %w(admin), name: "Joe User", id: 1)
    authorize_as_admin(user)
  end

  it 'base path should be set to tinymce asset folder' do
    visit admin_dashboard_path
    expect(page).to have_content <<-TINYMCE
var tinyMCEPreInit = {
  base: '/assets/tinymce',
  suffix: '.min'
};
TINYMCE
  end

  context 'with asset host' do
    before do
      expect(ActionController::Base.config).to receive(:asset_host_set?).and_return(true)
    end

    it 'base path should be set to tinymce asset folder' do
      visit admin_dashboard_path
      expect(page).to have_content <<-TINYMCE
var tinyMCEPreInit = {
  base: 'http://www.example.com/assets/tinymce',
  suffix: '.min'
};
TINYMCE
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
alchemy_cms-3.1.3 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.2.0.beta spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.1 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.rc3 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.rc2 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.rc1 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.beta6 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.beta5 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.beta4 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.beta3 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.beta2 spec/features/admin/tinymce_feature_spec.rb
alchemy_cms-3.1.0.beta1 spec/features/admin/tinymce_feature_spec.rb