Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

do booleans work correctly #246

Description

@catmando

Not sure if this was a regression that got fixed or what, but we need to add a test case like this:

it "will preserve boolean values correctly" do    
   stub_const 'Foo', Class.new(React::Component::Base)
   Foo.class_eval do
     param :foo
     def render
       foo = params.foo
       if foo && true
         "fail"
       else
         "succeed"
       end
     end
   end
   expect(Foo).to render_static_html('<span>succeed</span>').with_params(foo: false)
 end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions