Sha256: 2b6bdd2732152f069ba9d7962e86bfb9c31990b13e14e3ba82db963036d479f5

Contents?: true

Size: 667 Bytes

Versions: 9

Compression:

Stored size: 667 Bytes

Contents

require 'spec_helper'
require "rails-footnotes/notes/javascripts_note"

describe Footnotes::Notes::JavascriptsNote do
  let(:note) {described_class.new(double('controller', :response => double('body', :body => '')))}
  subject {note}

  it {should be_valid}

  it "should return js links from html after #scan_text mehtod call" do
    expect(subject.send(:scan_text, HTML_WITH_JS)).to eql ['/javascripts/all.js', '/javascripts/jquery.js']
  end
end

HTML_WITH_JS = <<-EOF
  <script cache="false" src="/javascripts/all.js?1315913920" type="text/javascript"></script>
  <script cache="false" src="/javascripts/jquery.js?1315913920" type="text/javascript"></script>
EOF

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
rails-footnotes-7.1.0 spec/notes/javascripts_note_spec.rb
rails-footnotes-7.0.1 spec/notes/javascripts_note_spec.rb
rails-footnotes-7.0.0 spec/notes/javascripts_note_spec.rb
rails-footnotes-5.0.0 spec/notes/javascripts_note_spec.rb
rails6-footnotes-5.0.2 spec/notes/javascripts_note_spec.rb
rails6-footnotes-5.0.1 spec/notes/javascripts_note_spec.rb
rails6-footnotes-5.0.0 spec/notes/javascripts_note_spec.rb
rails-footnotes-4.1.8 spec/notes/javascripts_note_spec.rb
rails-footnotes-4.1.7 spec/notes/javascripts_note_spec.rb