File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
lib/block_kit/layout/rich_text
spec/block_kit/layout/rich_text Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class RichText::List < BlockKit::Base
1111 ] . freeze
1212
1313 attribute :style , :string
14- attribute :elements , Types ::Array . of ( RichText ::Section )
14+ attribute :elements , Types ::Array . of ( RichText ::Section ) , default : [ ]
1515 attribute :indent , :integer
1616 attribute :offset , :integer
1717 attribute :border , :integer
Original file line number Diff line number Diff line change 4242 ]
4343 } )
4444 end
45+
46+ context "when elements are not specified" do
47+ let ( :attributes ) { { style : :bullet } }
48+
49+ it "returns an empty elements array" do
50+ expect ( block . as_json ) . to eq ( {
51+ type : described_class . type . to_s ,
52+ style : "bullet" ,
53+ elements : [ ]
54+ } )
55+ end
56+ end
4557 end
4658
4759 context "attributes" do
You can’t perform that action at this time.
0 commit comments