From 28ba55eae627c79ee000566f95d8d06ebbeba7aa Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Tue, 11 Mar 2014 22:25:29 -0600 Subject: [PATCH] fix global account js specs for rails 3 apparently oj is even more conservative than activesupport, and escapes forward slashes Change-Id: Ib7c2be9d049034890e3646ed11c8297ae6ea5f6d Reviewed-on: https://gerrit.instructure.com/31783 Tested-by: Jenkins Reviewed-by: Cody Cutrer Product-Review: Cody Cutrer QA-Review: Cody Cutrer --- spec/helpers/application_helper_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 1431b10190d..2c277b3ab1f 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -291,7 +291,7 @@ describe ApplicationHelper do output = include_account_js output.should have_tag 'script' - output.should match %r{/path/to/js} + output.should match %r{\\?/path\\?/to\\?/js} end it "should include site admin javascript" do @@ -301,7 +301,7 @@ describe ApplicationHelper do output = include_account_js output.should have_tag 'script' - output.should match %r{/path/to/js} + output.should match %r{\\?/path\\?/to\\?/js} end it "should include both site admin and root account javascript, site admin first" do @@ -315,7 +315,7 @@ describe ApplicationHelper do output = include_account_js output.should have_tag 'script' - output.scan(%r{/path/to/(admin/|root/)?js}).should eql [['admin/'], ['root/']] + output.scan(%r{\\?/path\\?/to\\?/(admin|root)?\\?/?js}).should eql [['admin'], ['root']] end end end @@ -325,7 +325,7 @@ describe ApplicationHelper do @site_admin = Account.site_admin @site_admin.expects(:global_includes_hash).once.returns({:css => "/path/to/css", :js => "/path/to/js"}) include_account_css.should match %r{/path/to/css} - include_account_js.should match %r{/path/to/js} + include_account_js.should match %r{\\?/path\\?/to\\?/js} end it "should only compute includes once, with includes" do