test/unit/text_document_test.rb in zena-0.15.2 vs test/unit/text_document_test.rb in zena-0.16.0

- old
+ new

@@ -52,11 +52,11 @@ bird = secure!(Node) { nodes(:bird_jpg)} b_at = bird.updated_at assert bird.update_attributes(:parent_id => node[:parent_id]) Zena::Db.set_attribute(bird, :updated_at, b_at) start =<<-END_CSS - body { font-size:10px; } + body { font-size:10px; behavior:url("/stylesheets/csshover2.htc"); } #header { background:url('bird.jpg') } #pv { background:url('bird_pv.jpg') } #footer { background:url('/projects/wiki/flower.jpg') } #back { background:url('../../projects/wiki/flower.jpg') } #no_stamp { background:url('/en/image30_pv.jpg') } @@ -64,13 +64,14 @@ node.version.text = start.dup # dummy controller helper = ApplicationController.new helper.instance_variable_set(:@visitor, visitor) text = node.parse_assets(start, helper, 'v_text') + err node assert node.errors.empty? res =<<-END_CSS - body { font-size:10px; } + body { font-size:10px; behavior:url("/stylesheets/csshover2.htc?#{File.mtime(File.join(RAILS_ROOT, 'public/stylesheets/csshover2.htc')).to_i}"); } #header { background:url('/en/image30.jpg?1144713600') } #pv { background:url('/en/image30_pv.jpg?967816914293') } #footer { background:url('/en/image31.jpg?1144713600') } #back { background:url('/en/image31.jpg?1144713600') } #no_stamp { background:url('/en/image30_pv.jpg?967816914293') } @@ -78,10 +79,10 @@ assert_equal res, text text = node.parse_assets(text, helper, 'v_text') assert_equal res, text text = node.unparse_assets(text, helper, 'v_text') unparsed =<<-END_CSS - body { font-size:10px; } + body { font-size:10px; behavior:url("/stylesheets/csshover2.htc"); } #header { background:url('bird.jpg') } #pv { background:url('bird_pv.jpg') } #footer { background:url('/projects/wiki/flower.jpg') } #back { background:url('/projects/wiki/flower.jpg') } #no_stamp { background:url('bird_pv.jpg') }