mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 10:14:59 +00:00
Ignore deleted devices while showing the App usage report
This commit is contained in:
@@ -7,4 +7,13 @@ RSpec.describe AppUsage, type: :model do
|
||||
it { should validate_presence_of :usage_duration_in_seconds }
|
||||
it { should validate_presence_of :used_on }
|
||||
it { should belong_to :device }
|
||||
|
||||
context "App Usage report" do
|
||||
let!(:app_usage) { create(:app_usage,device_id: nil) }
|
||||
it "Ignore Deleted devices" do
|
||||
app_usage = AppUsage.app_usages_per_device_app_day
|
||||
expect(app_usage).to be_empty
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user