Sha256: 8275422a1780e55b01391dc012ff6504f0cc294ae2367da2081a3fc7eab0843c
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
require 'spec_helper' class FilesController < ApplicationController def index end end describe FilesController, type: :controller do render_views before :all do Footnotes.enabled = true end after :all do Footnotes.enabled = false end it 'includes stylesheets assets in the response' do get :index js_debug = first('fieldset#javascripts_debug_info div', visible: false) expect(js_debug).to have_selector('li a', visible: false, count: 1) expect(js_debug).to have_selector('li a', text: /foobar\.js/, visible: false) link = js_debug.first('a', visible: false) expect(link['href']).to eq("txmt://open?url=file://#{Rails.root.join('app', 'assets', 'javascripts', 'foobar.js')}&line=1&column=1") end it 'includes css assets in the response' do get :index css_debug = first('fieldset#stylesheets_debug_info div', visible: false) expect(css_debug).to have_selector('li a', visible: false, count: 1) expect(css_debug).to have_selector('li a', text: /foobar\.css/, visible: false) link = css_debug.first('a', visible: false) expect(link['href']).to eq("txmt://open?url=file://#{Rails.root.join('app', 'assets', 'stylesheets', 'foobar.css')}&line=1&column=1") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails-footnotes-4.1.8 | spec/controllers/files_note_controller_spec.rb |
rails-footnotes-4.1.7 | spec/controllers/files_note_controller_spec.rb |