+ expect(described_class.instances[1].expired).to be_falsey
+ end
+ end
+
+ context 'with self.instances expired subkeys' do
+ before :each do
+ command_output = <<~OUTPUT
+ Executing: /tmp/apt-key-gpghome.0lru3TZOtF/gpg.1.sh --list-keys --with-colons --fingerprint 0x7721F63BD38B4796
+ tru:t:1:1682141947:0:3:1:5
+ pub:-:4096:1:7721F63BD38B4796:1460440275:::-:::scSC::::::23::0:
+ fpr:::::::::EB4C1BFD4F042F6DDDCCEC917721F63BD38B4796:
+ uid:-::::1460440275::7830FE2652F718E78EEE5881B7FA2CE8E3533BE4::Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>::::::::::0:
+ sub:e:4096:1:1397BC53640DB551:1460440520:1555048520:::::s::::::23:
+ fpr:::::::::3B068FB4789ABE4AEFA3BB491397BC53640DB551:
+ sub:e:4096:1:6494C6D6997C215E:1485225932:1579833932:::::s::::::23:
+ fpr:::::::::3E50F6D3EC278FDEB655C8CA6494C6D6997C215E:
+ OUTPUT
+ allow(described_class).to receive(:apt_key).with(
+ ['adv', '--no-tty', '--list-keys', '--with-colons', '--fingerprint', '--fixed-list-mode'],
+ ).and_return(command_output)
+ end
+
+ it 'returns 1 expired resource' do
+ expect(described_class.instances.size).to eq(1)
+ expect(described_class.instances[0].expired).to be_truthy