 		getInitialOrganization().then (initialOrg) =>
 			@initialOrg = initialOrg
 
+getDeviceType = memoize(
+	(deviceTypeId) ->
+		balena.pine.get
+			resource: 'device_type'
+			id: deviceTypeId
+			options:
+				$select: 'slug'
+	{
+		promise: true,
+		primitive: true
+	}
+)
+
 exports.givenAnApplication = (beforeFn) ->
 	exports.givenInitialOrganization(beforeFn)
 

Bluebird = require('bluebird')
_ = require('lodash')

{ chai } = require('mochainon')
chai.use(require('chai-samsam'))

			chai.expect(@application.is_for__device_type).to.be.an('object')
			.that.has.property('__id').that.is.a('number')

			getDeviceType(@application.is_for__device_type.__id)
		.then (@applicationDeviceType) =>
			chai.expect(@applicationDeviceType).to.be.an('object')
			.that.has.property('slug').that.is.a('string')
