mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 02:04:57 +00:00
Add GCM push for pushing OneMDM app to devices
- Add dashboard showing the status of installations - Add default status as 'pushed' for installation - Add has_many relations for installations for app and device models - Add logic to read the APP URL from config file
This commit is contained in:
21
spec/models/app_spec.rb
Normal file
21
spec/models/app_spec.rb
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe App, type: :model do
|
||||||
|
|
||||||
|
let!(:app) { create(:app) }
|
||||||
|
|
||||||
|
it { should validate_presence_of :name }
|
||||||
|
it { should validate_presence_of :package_name }
|
||||||
|
|
||||||
|
describe "APK URL" do
|
||||||
|
it "Default app" do
|
||||||
|
app = create(:app)
|
||||||
|
expect(app.apk_url).to eql(DEFAULT_APP_APK_URL)
|
||||||
|
end
|
||||||
|
it "Non Default app" do
|
||||||
|
app = App.create(name: "Non MDM", package_name: "com.nonmdm")
|
||||||
|
expect(app.apk_url).to eql("")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user