|
4 | 4 |
|
5 | 5 | describe 'accounts_ssh_authorized_keys_line_parser' do |
6 | 6 | it { |
7 | | - is_expected.not_to eq(nil) |
| 7 | + expect(subject).not_to eq(nil) |
8 | 8 | } |
9 | 9 |
|
10 | 10 | it { |
11 | | - is_expected.to run.with_params('').and_raise_error(ArgumentError, %r{Wrong Keyline format!}) |
| 11 | + expect(subject).to run.with_params('').and_raise_error(ArgumentError, %r{Wrong Keyline format!}) |
12 | 12 | } |
13 | 13 |
|
14 | 14 | it { |
15 | | - is_expected.to run.with_params('options unknown-keytype key comment').and_raise_error(ArgumentError, %r{Wrong Keyline format!}) |
| 15 | + expect(subject).to run.with_params('options unknown-keytype key comment').and_raise_error(ArgumentError, %r{Wrong Keyline format!}) |
16 | 16 | } |
17 | 17 |
|
18 | 18 | it { |
19 | | - is_expected.to run.with_params('ssh-xyz key name with spaces').and_return( \ |
| 19 | + expect(subject).to run.with_params('ssh-xyz key name with spaces').and_return( \ |
20 | 20 | ['', 'ssh-xyz', 'key', 'name with spaces'], |
21 | 21 | ) |
22 | 22 | } |
23 | 23 |
|
24 | 24 | it { |
25 | | - is_expected.to run.with_params('"options with arguments",moreoptions,"moreoptions with arguments" ecdsa-xyz key name with spaces').and_return( \ |
| 25 | + expect(subject).to run.with_params('"options with arguments",moreoptions,"moreoptions with arguments" ecdsa-xyz key name with spaces').and_return( \ |
26 | 26 | ['"options with arguments",moreoptions,"moreoptions with arguments"', 'ecdsa-xyz', 'key', 'name with spaces'], |
27 | 27 | ) |
28 | 28 | } |
29 | 29 |
|
30 | 30 | it { |
31 | | - is_expected.to run.with_params('tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...== [email protected]').and_return( \ |
| 31 | + expect(subject).to run.with_params('tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...== [email protected]').and_return( \ |
32 | 32 | ['tunnel="0",command="sh /etc/netstart tun0"', 'ssh-rsa', 'AAAA...==', '[email protected]'], |
33 | 33 | ) |
34 | 34 | } |
35 | 35 |
|
36 | 36 | it { |
37 | 37 | # rubocop:disable Layout/LineLength |
38 | | - is_expected.to run.with_params('command="rsync --server --sender -vlHogtpr --numeric-ids . /",from="192.168.1.1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ecdsa-sha2-nistp384 AAAA...= rsync backup').and_return( \ |
| 38 | + expect(subject).to run.with_params('command="rsync --server --sender -vlHogtpr --numeric-ids . /",from="192.168.1.1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ecdsa-sha2-nistp384 AAAA...= rsync backup').and_return( \ |
39 | 39 | ['command="rsync --server --sender -vlHogtpr --numeric-ids . /",from="192.168.1.1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding', 'ecdsa-sha2-nistp384', 'AAAA...=', 'rsync backup'], |
40 | 40 | ) |
41 | 41 | # rubocop:enable Layout/LineLength |
|
0 commit comments