Sha256: 0dff9db067c37d5d4aa3f3aba0afc4eb8c3245a1ae7c7233b997975f99009d3d

Contents?: true

Size: 908 Bytes

Versions: 7

Compression:

Stored size: 908 Bytes

Contents

# -*- encoding : utf-8 -*-

describe Card::Set::Rstar::Rules do
  it "should render setting view for a right set" do
     r = Card['*read+*right'].format.render_open
     expect(r).not_to match(/error/i)
     expect(r).not_to match('No Card!')
     #warn "r = #{r}"
     assert_view_select r, 'table[class="set-rules table"]' do
       assert_select 'a[href~="/*read+*right+*read?view=open_rule"]', :text => 'read'
     end
  end

  it "should render setting view for a *input rule" do
    Card::Auth.as_bot do
      r = Card.fetch('*read+*right+*input',:new=>{}).format.render_open_rule
      expect(r).not_to match(/error/i)
      expect(r).not_to match('No Card!')
      #warn "r = #{r}"
      assert_view_select r, 'tr[class="card-slot open-rule edit-rule"]' do
        assert_select 'input[id="success_id"][name=?][type="hidden"][value="*read+*right+*input"]', 'success[id]'
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
card-1.16.6 mod/05_standard/spec/set/rstar/rules_spec.rb
card-1.16.5 mod/05_standard/spec/set/rstar/rules_spec.rb
card-1.16.4 mod/05_standard/spec/set/rstar/rules_spec.rb
card-1.16.3 mod/05_standard/spec/set/rstar/rules_spec.rb
card-1.16.2 mod/05_standard/spec/set/rstar/rules_spec.rb
card-1.16.1 mod/05_standard/spec/set/rstar/rules_spec.rb
card-1.16.0 mod/05_standard/spec/set/rstar/rules_spec.rb