Files
onemdm-server/spec/models/app_spec.rb
leenasn 51881fa3fb 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
2015-11-16 19:08:05 +05:30

22 lines
479 B
Ruby

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