mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Merge pull request #82 from finn-no/namingEvents
Adding some tests to the wrong branch
This commit is contained in:
		
						commit
						397320886f
					
				@ -37,7 +37,7 @@
 | 
			
		||||
    "trailing"      : true,
 | 
			
		||||
    "maxparams"     : 3,
 | 
			
		||||
    "maxdepth"      : 4,
 | 
			
		||||
    "maxstatements" : 10,
 | 
			
		||||
    "maxstatements" : 20,
 | 
			
		||||
    "maxcomplexity" : 10,
 | 
			
		||||
    "maxlen"        : 120,
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -28,6 +28,13 @@ describe('The features api', function () {
 | 
			
		||||
            .expect(200, done);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('cant get feature that dose not exist', function (done) {
 | 
			
		||||
        request
 | 
			
		||||
            .get('/features/myFeature')
 | 
			
		||||
            .expect('Content-Type', /json/)
 | 
			
		||||
            .expect(404, done);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('creates new feature toggle', function (done) {
 | 
			
		||||
        request
 | 
			
		||||
            .post('/features')
 | 
			
		||||
@ -88,4 +95,12 @@ describe('The features api', function () {
 | 
			
		||||
            .expect(404, done);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('refuses to create a feature with an existing name', function (done) {
 | 
			
		||||
        request
 | 
			
		||||
            .post('/features')
 | 
			
		||||
            .send({name: 'featureX'})
 | 
			
		||||
            .set('Content-Type', 'application/json')
 | 
			
		||||
            .expect(403, done);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user