var expect = require('expect');


describe('aides descriptions', function() {
    var subject = require('../../app/js/constants/droits');

    Object.keys(subject.prestationsNationales).forEach(function(providerName) {
        describe(providerName, function() {
            var provider = subject.prestationsNationales[providerName];

            it('should have a label', function() {
                expect(typeof provider.label).toBe('string');
                expect(provider.label.length).toBeGreaterThan(1);
            });

            Object.keys(provider.prestations).forEach(function(aideName) {
                describe(aideName, function() {
                    var aide = provider.prestations[aideName];

                    it('should have a label', function() {
                        expect(typeof aide.label).toBe('string');
                        expect(aide.label.length).toBeGreaterThan(1);
                    });

                    it('should have a description', function() {
                        expect(typeof aide.description).toBe('string');
                        expect(aide.description.length).toBeGreaterThanOrEqual(190);
                        expect(aide.description.length).toBeLessThanOrEqual(420);
                    });

                    it('should have a link', function() {
                        expect(typeof aide.link).toBe('string');
                        expect(aide.link).toMatch(/^https?:\/\//);
                    });

                    it('should have a teleservice, a form, or instructions', function() {
                        expect(typeof (aide.teleservice || aide.form || aide.instructions)).toBe('string');
                    });
                });
            });
        });
    });
});

@@ -1478,231 +1478,8 @@
  %7D);
-%0A%0A                    it('should have a teleservice, a form, or instructions', function() %7B%0A                        expect(typeof (aide.teleservice %7C%7C aide.form %7C%7C aide.instructions)).toBe('string');%0A                    %7D);
 %0A   

Supprime l'obligation de CTA pour les aides