Skip to content

Commit

Permalink
Fix tests for spec/dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Mar 26, 2016
1 parent a07d566 commit 3d1c460
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions spec/dummy/spec/helpers/react_on_rails_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
require "rails_helper"

describe ReactOnRailsHelper, type: :helper do
before do
allow(self).to receive(:request) {
OpenStruct.new(
original_url: "http://foobar.com/development",
env: { "HTTP_ACCEPT_LANGUAGE" => "en" }
)
}
end

describe "#sanitized_props_string(props)" do
let(:hash) do
{
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/spec/requests/console_logging_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

expected = <<-JS
console.log.apply(console, ["[SERVER] RENDERED HelloWorldWithLogAndThrow to dom node \
with id: HelloWorldWithLogAndThrow-react-component-0"]);
with id: HelloWorldWithLogAndThrow-react-component-0 with props, railsContext:"
console.log.apply(console, ["[SERVER] console.log in HelloWorld"]);
console.warn.apply(console, ["[SERVER] console.warn in HelloWorld"]);
console.error.apply(console, ["[SERVER] console.error in HelloWorld"]);
Expand Down

0 comments on commit 3d1c460

Please sign in to comment.