Skip to content

Commit 9ef7a62

Browse files
Merge pull request #2834 from skateman/authkeypair-spec
Add spec for checking lastaction in the AuthKeyPairController 🌭
2 parents 7a02bf1 + 5b682ec commit 9ef7a62

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

spec/controllers/auth_key_pair_cloud_controller_spec.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,26 @@
6868
"fingerprint"
6969
end
7070
end
71+
72+
describe '#show_list' do
73+
before do
74+
stub_user(:features => :all)
75+
EvmSpecHelper.create_guid_miq_server_zone
76+
end
77+
78+
render_views
79+
80+
it 'sets the lastaction correctly' do
81+
expect_any_instance_of(GtlHelper).to receive(:render_gtl).with match_gtl_options(
82+
:model_name => 'ManageIQ::Providers::CloudManager::AuthKeyPair',
83+
:report_data_additional_options => {
84+
:model => "ManageIQ::Providers::CloudManager::AuthKeyPair",
85+
:lastaction => 'show_list'
86+
}
87+
)
88+
89+
get :show_list
90+
expect(response.status).to eq(200)
91+
end
92+
end
7193
end

0 commit comments

Comments
 (0)