Skip to content

Commit

Permalink
ref: ApiRGBColorToJson
Browse files Browse the repository at this point in the history
  • Loading branch information
Yar04ek committed Dec 1, 2023
1 parent d10e24a commit 113178e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/docx/smoke/api_rgb_color_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
it 'ApiRGBColor | ToJSON method' do
docx = builder.build_and_parse('js/docx/smoke/api_rgb_color/to_json.js')
first_paragraph_json = JSON.parse(docx.elements[0].nonempty_runs.first.text)
second_paragraph_json = JSON.parse(docx.elements[1].nonempty_runs.first.text)
expect(second_paragraph_json.to_s).to include(first_paragraph_json.to_s)
expect(first_paragraph_json["color"]["rgba"]["red"]).to eq(255)
expect(first_paragraph_json["color"]["rgba"]["green"]).to eq(111)
expect(first_paragraph_json["color"]["rgba"]["blue"]).to eq(61)
end
end

0 comments on commit 113178e

Please sign in to comment.