Skip to content

Commit

Permalink
Cloud: Add test to ensure data keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed Jan 22, 2024
1 parent a9662a9 commit 619048b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/lib/senec/cloud/dashboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,21 @@
it 'fetches the data' do
expect(dashboard.data).to include('aktuell', 'heute')
end

it 'fetches data with keys' do
expected_keys = %w[
stromerzeugung stromverbrauch
netzeinspeisung netzbezug
speicherbeladung speicherentnahme
speicherfuellstand
autarkie
wallbox
]

%w[aktuell heute].each do |key|
expect(dashboard.data[key].keys).to match_array(expected_keys)
end
end
end

context 'with INVALID system_id', vcr: 'cloud/fetch-dashboard-invalid-system' do
Expand Down

0 comments on commit 619048b

Please sign in to comment.