Sha256: bd623c7535daaa7a8b7e62a5d49a09b9005ddb522bf0b58eae32c92631f7ee75

Contents?: true

Size: 934 Bytes

Versions: 7

Compression:

Stored size: 934 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'wagn/spec_helper'

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

  it "should render setting view for a *input rule" do
    Account.as_bot do
      r = Card::Format.new(Card.fetch('*read+*right+*input',:new=>{})).render_open_rule
      r.should_not match(/error/i)
      r.should_not 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
wagn-1.12.13 spec/mods/standard/sets/rstar/rules_spec.rb
wagn-1.12.12 spec/mods/standard/sets/rstar/rules_spec.rb
wagn-1.12.11 spec/mods/standard/sets/rstar/rules_spec.rb
wagn-1.12.10 spec/mods/standard/sets/rstar/rules_spec.rb
wagn-1.12.9 spec/mods/standard/sets/rstar/rules_spec.rb
wagn-1.12.8 spec/mods/standard/sets/rstar/rules_spec.rb
wagn-1.12.7 spec/mods/standard/sets/rstar/rules_spec.rb