Skip to content

Commit

Permalink
Fix IAM date tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alpineriveredge committed May 28, 2024
1 parent 38aaec1 commit 8b41e38
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/awspec/generator/spec/iam_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def iam_group_spec_template
describe iam_group('<%= group.group_name %>') do
it { should exist }
its(:arn) { should eq '<%= group.arn %>' }
its(:create_date) { should eq Time.parse('<%= group.create_date %>') }
its(:create_date) { should eq Time.parse('<%= group.create_date.utc %>') }
<% select_iam_policy_by_group_name(group.group_name).each do |policy| %> it { should have_iam_policy('<%= policy.policy_name %>') }
<% end %>
<%- inline_policies.each do |line| -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/awspec/generator/spec/iam_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def policy_spec_template
it { should_not be_attachable }
<%- end -%>
its(:arn) { should eq '<%= policy.arn %>' }
its(:update_date) { should eq Time.parse('<%= policy.update_date %>') }
its(:update_date) { should eq Time.parse('<%= policy.update_date.utc %>') }
its(:attachment_count) { should eq <%= policy.attachment_count %> }
<%- users = select_attached_users(policy.arn) -%>
<%- if users.empty? -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/awspec/generator/spec/iam_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def iam_role_spec_template
describe iam_role('<%= role.role_name %>') do
it { should exist }
its(:arn) { should eq '<%= role.arn %>' }
its(:create_date) { should eq Time.parse('<%= role.create_date %>') }
its(:create_date) { should eq Time.parse('<%= role.create_date.utc %>') }
<% select_iam_policy_by_role_name(role.role_name).each do |policy| %> it { should have_iam_policy('<%= policy.policy_name %>') }
<% end %>
<%- inline_policies.each do |line| -%>
Expand Down
2 changes: 1 addition & 1 deletion lib/awspec/generator/spec/iam_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def iam_user_spec_template
describe iam_user('<%= user.user_name %>') do
it { should exist }
its(:arn) { should eq '<%= user.arn %>' }
its(:create_date) { should eq Time.parse('<%= user.create_date %>') }
its(:create_date) { should eq Time.parse('<%= user.create_date.utc %>') }
<% select_iam_policy_by_user_name(user.user_name).each do |policy| %> it { should have_iam_policy('<%= policy.policy_name %>') }
<% end %>
<%- inline_policies.each do |line| -%>
Expand Down

0 comments on commit 8b41e38

Please sign in to comment.