Skip to content

Commit

Permalink
ref: ApiTableRowPr.ToJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Yar04ek committed Dec 15, 2023
1 parent ecbfa8d commit 9cfc3ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/docx/smoke/api_table_row_properties_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@
json = docx.elements[1].nonempty_runs.map(&:text).join
parsed_json = JSON.parse(json)
expect(parsed_json).to include('name' => 'My Custom Table Style')
expect(parsed_json['tblPr']).to include('tblOverlap' => 'never', 'inline' => false, 'type' => 'tablePr')
expect(parsed_json['trPr']).to include('type' => 'tableRowPr')
expect(parsed_json['trPr']['trHeight']).to include('val' => 720, 'hRule' => 'atLeast')
expect(parsed_json['trPr']['trHeight']['val']).to eq(720)
expect(parsed_json['trPr']['trHeight']['hRule']).to eq('atLeast')
expect(parsed_json['styleType']).to eq('tableStyle')
end
end

0 comments on commit 9cfc3ae

Please sign in to comment.