• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / pdc_discovery / c22943e7-fec0-4630-b91e-844cc844ccdc

08 Nov 2024 02:14PM UTC coverage: 96.253% (-1.0%) from 97.231%
c22943e7-fec0-4630-b91e-844cc844ccdc

Pull #710

circleci

20LM22
xit 302 error
Pull Request #710: Runs tests in random order

7 of 8 new or added lines in 2 files covered. (87.5%)

40 existing lines in 3 files now uncovered.

3545 of 3683 relevant lines covered (96.25%)

292.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.85
/spec/models/version_footer_spec.rb
1
# frozen_string_literal: true
2

3
require 'rails_helper'
1✔
4

5
# rubocop:disable RSpec/ExampleLength
6
RSpec.describe VersionFooter do
1✔
7
  describe "info" do
1✔
8
    context "with stale information" do
1✔
9
      before do
1✔
UNCOV
10
        described_class.revision_file = Pathname.new(fixture_paths.first).join("REVISION").to_s
×
UNCOV
11
        described_class.revisions_logfile = Pathname.new(fixture_paths.first).join("revisions_stale.log").to_s
×
UNCOV
12
        described_class.reset!
×
13
      end
14

15
      xit "detects stale information" do # like rollback is influenced by current setting @@stale to false and then it not getting set back
1✔
UNCOV
16
        info = described_class.info
×
UNCOV
17
        expect(info[:stale]).to be true
×
UNCOV
18
        expect(info[:sha]).to eq "2222ae5c4ad9aaa0faad5208f1bf8108bd5934bf"
×
UNCOV
19
        expect(info[:branch]).to eq "version-2"
×
UNCOV
20
        expect(info[:version]).to eq "02 December 2021"
×
UNCOV
21
        expect(info[:tagged_release]).to be false
×
22
      end
23
    end
24

25
    context "with current information" do
1✔
26
      before do
1✔
27
        described_class.revision_file = Pathname.new(fixture_paths.first).join("REVISION").to_s
1✔
28
        described_class.revisions_logfile = Pathname.new(fixture_paths.first).join("revisions_current.log").to_s
1✔
29
        described_class.reset!
1✔
30
      end
31
      it "detects current information" do
1✔
32
        info = described_class.info
1✔
33
        expect(info[:stale]).to be false
1✔
34
        expect(info[:sha]).to eq "7a3b1d7c0f77db526963568ece3e0bb5a6399ce4"
1✔
35
        expect(info[:branch]).to eq "v0.8.0"
1✔
36
        expect(info[:version]).to eq "10 December 2021"
1✔
37
        expect(info[:tagged_release]).to be true
1✔
38
      end
39
    end
40

41
    context "with rollback information" do
1✔
42
      before do
1✔
UNCOV
43
        described_class.revision_file = Pathname.new(fixture_paths.first).join("REVISION").to_s
×
UNCOV
44
        described_class.revisions_logfile = Pathname.new(fixture_paths.first).join("revisions_rollback.log").to_s
×
UNCOV
45
        described_class.reset!
×
46
      end
47
      xit "detects current information" do
1✔
UNCOV
48
        info = described_class.info
×
NEW
49
        expect(info[:stale]).to be false # may want to reconsider what state stale should be
×
UNCOV
50
        expect(info[:sha]).to eq "to"
×
UNCOV
51
        expect(info[:branch]).to eq "rolled"
×
UNCOV
52
        expect(info[:version]).to eq "(Deployment date could not be parsed from: deploy rolled back to release 20211210150445\n.)"
×
UNCOV
53
        expect(info[:tagged_release]).to be false
×
54
      end
55
    end
56
  end
57
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc