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:
leenasn
2015-11-16 19:04:52 +05:30
parent 066553d0e2
commit 51881fa3fb

21
spec/models/app_spec.rb Normal file
View 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