Commit b08b785c authored by Thong Kuah's avatar Thong Kuah

Expose updated_at property for cluster env

This fixes the cluster environments page showing the wrong value for
"Last updated".
parent 044c7f83
...@@ -14,6 +14,8 @@ module Clusters ...@@ -14,6 +14,8 @@ module Clusters
expose :rollout_status, if: -> (*) { can_read_cluster_deployments? }, using: ::RolloutStatusEntity expose :rollout_status, if: -> (*) { can_read_cluster_deployments? }, using: ::RolloutStatusEntity
expose :updated_at
private private
alias_method :environment, :object alias_method :environment, :object
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
}, },
"rollout_status": { "rollout_status": {
"$ref": "../rollout_status.json" "$ref": "../rollout_status.json"
} },
"updated_at": { "type": "date" }
}, },
"additionalProperties": false "additionalProperties": false
} }
...@@ -34,6 +34,10 @@ describe Clusters::EnvironmentEntity do ...@@ -34,6 +34,10 @@ describe Clusters::EnvironmentEntity do
expect(subject).to include(:environment_path) expect(subject).to include(:environment_path)
end end
it 'exposes updated_at' do
expect(subject).to include(:updated_at)
end
context 'deploy board available' do context 'deploy board available' do
before do before do
allow(group).to receive(:feature_available?).and_call_original allow(group).to receive(:feature_available?).and_call_original
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment