You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					22 lines
				
				540 B
			
		
		
			
		
	
	
					22 lines
				
				540 B
			| 
											3 years ago
										 | import Resource from '../../src/resource' | ||
|  | import { User } from '../utils/models' | ||
|  | import Property from '../../src/property' | ||
|  | 
 | ||
|  | describe('Resource #property', () => { | ||
|  |   let resource | ||
|  |   let returnedProperty | ||
|  | 
 | ||
|  |   beforeEach(() => { | ||
|  |     resource = new Resource(User) | ||
|  |     returnedProperty = resource.property('email') | ||
|  |   }) | ||
|  | 
 | ||
|  |   it('returns selected property for an email', () => { | ||
|  |     expect(returnedProperty.name()).toEqual('email') | ||
|  |   }) | ||
|  | 
 | ||
|  |   it('returns instance of Property class', () => { | ||
|  |     expect(returnedProperty).toBeInstanceOf(Property) | ||
|  |   }) | ||
|  | }) |