<commit_before>describe('angular.common: api', function() {
    var scope, httpMock, api, http;

    beforeEach(module('common.api'));

    beforeEach(inject(function($rootScope, $controller, $httpBackend, Api, $http) {
        scope = $rootScope.$new();
        httpMock = $httpBackend;
        api = Api;
        http = $http;

        httpMock.when('GET', '/api/v2/test').respond('resr');
    }));

    it('should set the base to an api', function() {
        api.setBase('/api/v2/');
        expect(api.getBase()).toBe('/api/v2/');
    });

    it('should convert and object to a query string', function() {
        var data = {
            userId: 1,
            posts: ['test', 'test1']
        };

        expect(api.encodeObject(data), "userId=1&posts[0]=test&posts[1]=test1");
    });

    it('should make a GET request to a url', function() {
        expect(api.get('/api/v2/')).toBeDefined();
    });

    it('should make a PUT request to a url', function() {
        expect(api.put('/api/v2/')).toBeDefined();
    });

    it('should make a POST request to a url', function() {
        expect(api.post('/api/v2/')).toBeDefined();
    });

    it('should make a  request to a url', function() {
        expect(api.delete('/api/v2/')).toBeDefined();
    });
});<commit_msg>chagned the routes in the api tests<commit_after>describe('angular.common: api', function() {
    var scope, httpMock, api, http;

    beforeEach(module('common.api'));

    beforeEach(inject(function($rootScope, $controller, $httpBackend, Api, $http) {
        scope = $rootScope.$new();
        httpMock = $httpBackend;
        api = Api;
        http = $http;

        httpMock.when('GET', '/api/v2/test').respond('resr');
    }));

    it('should set the base to an api', function() {
        api.setBase('/api/v2/');
        expect(api.getBase()).toBe('/api/v2/');
    });

    it('should convert and object to a query string', function() {
        var data = {
            userId: 1,
            posts: ['test', 'test1']
        };

        expect(api.encodeObject(data), "userId=1&posts[0]=test&posts[1]=test1");
    });

    it('should make a GET request to a url', function() {
        expect(api.get('users/1')).toBeDefined();
    });

    it('should make a PUT request to a url', function() {
        expect(api.put('users/1')).toBeDefined();
    });

    it('should make a POST request to a url', function() {
        expect(api.post('users')).toBeDefined();
    });

    it('should make a  request to a url', function() {
        expect(api.delete('users/1')).toBeDefined();
    });
});
{'fraction_non_alphanumeric': 0.18783888458559256, 'fraction_numerical': 0.009682416731216111, 'mean_word_length': 2.5775623268698062, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7362164', 'n_tokens_mistral': 819, 'n_tokens_neox': 814, 'n_words': 188}