Sha256: e4ac177ffa12a4793c6f21109ef195d57630d561304c8bf7378e10dd147b7565

Contents?: true

Size: 1.11 KB

Versions: 24

Compression:

Stored size: 1.11 KB

Contents

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

describe Card::Set::Right::Comment do

  context "record appender" do
    before do
#      @r = Card.where(:type_id=>Card::RoleID).first
      @rule = Card.new :name=>'A+*self+*comment', :type_id=>Card::PointerID, :content=>"[[Anyone Signed In]]"
    end

    it "should have appender immediately" do
      expect(Card['a'].ok?(:comment)).not_to be_truthy
      Card::Auth.as_bot do
        @rule.save!
      end
      expect(Card['a'].ok?(:comment)).to be_truthy
    end

    it "should have appender immediately" do
      Card::Auth.as_bot do 
        expect(Card['a'].ok?(:comment)).not_to be_truthy 
        @rule.save!
        expect(Card['a'].ok?(:comment)).to be_truthy
      end
    end
  end


  context "comment addition" do
    it "should combine content after save" do
      Card::Auth.as_bot do
        Card.create :name => 'basicname+*self+*comment', :content=>'[[Anyone Signed In]]'
        @c = Card.fetch "basicname"
        @c.comment = " and more\n  \nsome lines\n\n"
        @c.save!
      end
      expect(Card["basicname"].content).to match(/\<p\>some lines\<\/p\>/)
    end
  end

end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
card-1.16.6 mod/04_settings/spec/set/right/comment_spec.rb
card-1.16.5 mod/04_settings/spec/set/right/comment_spec.rb
card-1.16.4 mod/04_settings/spec/set/right/comment_spec.rb
card-1.16.3 mod/04_settings/spec/set/right/comment_spec.rb
card-1.16.2 mod/04_settings/spec/set/right/comment_spec.rb
card-1.16.1 mod/04_settings/spec/set/right/comment_spec.rb
card-1.16.0 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.7 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.6 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.5 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.4 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.3 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.2 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.1 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.0 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.pre2 mod/04_settings/spec/set/right/comment_spec.rb
card-1.15.pre mod/04_settings/spec/set/right/comment_spec.rb
wagn-1.14.9 mod/04_settings/spec/set/right/comment_spec.rb
wagn-1.14.8 mod/04_settings/spec/set/right/comment_spec.rb
wagn-1.14.7 mod/04_settings/spec/set/right/comment_spec.rb