From 1061273d7f34aa711898adbaa7e767a899304231 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Thu, 26 Sep 2024 12:05:15 +0300 Subject: [PATCH] #141 tested --- test/pages/test_eva_summary.rb | 46 ++++++++++++++++++++++++++++++++++ xsl/vitals.xsl | 13 ---------- 2 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 test/pages/test_eva_summary.rb diff --git a/test/pages/test_eva_summary.rb b/test/pages/test_eva_summary.rb new file mode 100644 index 0000000..0c06bb3 --- /dev/null +++ b/test/pages/test_eva_summary.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# MIT License +# +# Copyright (c) 2024 Zerocracy +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +require 'minitest/autorun' +require_relative '../test__helper' + +# Test. +# Author:: Yegor Bugayenko (yegor256@gmail.com) +# Copyright:: Copyright (c) 2024 Yegor Bugayenko +# License:: MIT +class TestEvaSummary < Minitest::Test + def test_template + xml = xslt( + '', + ' + + + earned-value + + + ' + ) + assert(xml.xpath('/p/text()').to_s.start_with?('Not enough data'), xml) + end +end diff --git a/xsl/vitals.xsl b/xsl/vitals.xsl index 8d96476..25033c4 100644 --- a/xsl/vitals.xsl +++ b/xsl/vitals.xsl @@ -263,17 +263,4 @@ SOFTWARE. - - AC: - - , EV: - - , PV: - - , CPI: - - , SPI: - - . -