'use strict';

const odata = require('../odata');

const config = {
  service: 'https://example.com',
  resources: 'Customers'
};

describe('select tests', function() {
  var q;
  beforeEach(function() {
    q = odata(config);
  });

  it('should select a single parameter', function() {
    expect(q.select('Account').query()).toEqual('https://example.com/Customers?%24select=Account');
  });

  it('should select a several parameters', function() {
    expect(q.select('Account', 'Status').query()).toEqual('https://example.com/Customers?%24select=Account%2CStatus');
  });

  it('should select an array of parameters', function() {
    expect(q.select(['Account', 'Status']).query()).toEqual('https://example.com/Customers?%24select=Account%2CStatus');
  });

  it('should select several parameters', function() {
    expect(q.select('Account').select('Status').query()).toEqual('https://example.com/Customers?%24select=Account%2CStatus');
  });

});


@@ -786,32 +786,43 @@
 veral parameters
+ (method 2)
 ', function() %7B%0A
@@ -954,13 +954,145 @@
 %0A  %7D);%0A%0A
+  it('should select *', function() %7B%0A    expect(q.select('*').query()).toEqual('https://example.com/Customers?%2524select=*');%0A  %7D);%0A%0A
 %7D);%0A%0A

Add select spec