<commit_before>describe ("SessionController", function() {

  var session;
  var pointUser;


  beforeEach(function() {
    pointUser = {"name": "<NAME>", "age": "29", "twitterOn": true};
    session = jasmine.createSpyObj('session', ['enabled', 'user']);

    session.enabled();
    session.user(pointUser);
  });

  it("creates spies for each requested function", function() {
    expect(session.enabled).toBeDefined();
    expect(session.user).toBeDefined();
  });

  it("tracks that the spies were called", function() {
    expect(session.enabled).toHaveBeenCalled();
    expect(session.user).toHaveBeenCalled();
  });

  it("pointUser object contains the proper values", function() {
    expect(pointUser).toEqual(jasmine.objectContaining({name: "<NAME>"}));
    expect(pointUser).toEqual(jasmine.objectContaining({age: "29"}));
    expect(pointUser).toEqual(jasmine.objectContaining({twitterOn: true}));
  });

  it("session.enabled evaluates to true", function() {
    expect(session.enabled).toBeTruthy();
  });
});<commit_msg>Controller; write session controller specs.<commit_after>describe ("SessionController", function() {

  var session;
  var mike;
  var googleAcctObj;

  beforeEach(function() {
    googleAcctObj = {"name": "<NAME>", "email": "<EMAIL>"};
    mike = new PointUser(googleAcctObj);
    session = new SessionController(mike);

    // session.enabled();
    //session.user(mike);
  });

  it("has a user", function() {
    expect(session.user).toBeDefined();
  });

   it("can return its user", function() {
    expect(session.user).toEqual(mike);
  });

  it("it can read the properties from the user that were instantiated at user object creation", function() {
    expect(session.user.googleAcctObj).toEqual(googleAcctObj);
    expect(session.user.userId).toEqual(0);
    expect(session.user.drafts.constructor).toEqual(Array);
    expect(session.user.pointHistory.constructor).toEqual(Object);
  });

  it("mike object contains the proper values", function() {
    expect(mike.googleAcctObj).toEqual(jasmine.objectContaining({name: "<NAME>"}));
    expect(mike.googleAcctObj).toEqual(jasmine.objectContaining({email: "<EMAIL>"}));
  });

  it("session.enabled evaluates to true", function() {
    expect(session.enabled).toBeTruthy();
  });

  xit("session can return the user's email", function() {
    expect(session.userEmail()).toEqual("<EMAIL>");
  });

  xit("can shorten a url", function(){
    var bitly = session.shortenUrl();
    expect(session.bitly).toBeTruthy;
    expect(session.bity.length).toBeGreaterThan(4);
  });

  xit("returns false if the user doesn't want to append links", function(){
    mike.turnOffUrlShare();
    expect(session.shortenUrl()).toBeFalsy;
  })

});
{'fraction_non_alphanumeric': 0.1692985677561513, 'fraction_numerical': 0.0022034520749173708, 'mean_word_length': 4.675, 'pattern_counts': {'":': 5, '<': 10, '<?xml version=': 0, '>': 10, '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': '394401', 'n_tokens_mistral': 849, 'n_tokens_neox': 820, 'n_words': 164}