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

From e8dec526dda530b4bd86195973eba4ce81f3ec83 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 fe278d7ae5..af7fb6eea2 100644
--- a/src/api/spec/helpers/webui/webui_helper_spec.rb
+++ b/src/api/spec/helpers/webui/webui_helper_spec.rb
@@ -252,7 +252,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.20.1