From 113178e9a5b0ff6725a29b7b08cfb8d240ac785d Mon Sep 17 00:00:00 2001 From: Yar04ek Date: Fri, 1 Dec 2023 09:45:09 +0100 Subject: [PATCH] ref: ApiRGBColorToJson --- spec/docx/smoke/api_rgb_color_spec.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/docx/smoke/api_rgb_color_spec.rb b/spec/docx/smoke/api_rgb_color_spec.rb index 12ee650d0..a2719c409 100644 --- a/spec/docx/smoke/api_rgb_color_spec.rb +++ b/spec/docx/smoke/api_rgb_color_spec.rb @@ -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