File obs-server-2.10-0019-ci-Fix-compatibility-with-Ruby-2.3-in-webui-helper-t.patch of Package obs-server

From f64a67c657fcfa41ffbc06153e127f2d1d7b354a Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Fri, 14 Jul 2017 04:58:14 +0100
Subject: [PATCH] [ci] Fix compatibility with Ruby 2.3 in webui helper test.

Inetegers are instances of Fixnum, not Integer in Ruby 2.3.
However, Fixnum inherits from Integer.

This returns true in Ruby 2.4, but false in Ruby 2.3:
1.instance_of?(Integer)

This returns true in both Rube 2.3 and 2.4:
1.kind_of?(Integer)

Hence, using be_kind_of(Integer) instead of be_instance_of(Integer)
matcher applied to integer value fixes test that fails in Ruby 2.3.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
 src/api/spec/helpers/webui/webui_helper_spec.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api/spec/helpers/webui/webui_helper_spec.rb b/src/api/spec/helpers/webui/webui_helper_spec.rb
index a8053c4d04..7bff393a48 100644
--- a/src/api/spec/helpers/webui/webui_helper_spec.rb
+++ b/src/api/spec/helpers/webui/webui_helper_spec.rb
@@ -256,7 +256,7 @@ RSpec.describe Webui::WebuiHelper do
       @codemirror_editor_setup = 0
     end
 
-    it { expect(next_codemirror_uid).to be_instance_of(Integer) }
+    it { expect(next_codemirror_uid).to be_kind_of(Integer) }
 
     context "if next_codemirror_uid get's called the first time" do
       it { expect(next_codemirror_uid).to eq(1) }
-- 
2.31.1