title: How to test simple if condition containing method call in jasmine
body: <p>I am new to jasmine I need to write jasmine unit test case for below code .</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>if(checkForRelationship()){
    var relationship = localStorage.getItem('relationship');
  }
  else{
    localStorage.setItem('relationship',{id:'someId'});
  }
  
     // where  checkForRelationship method is like below
  
  function checkForRelationship(){
    
    return !!localStorage.getItem('relationship');
    
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Appreciate your help.</p>