title: How to unit test conditional statements in jasmine
body: <p>Can any one help me with testing conditional statement within a function in jasmine </p>
  
  <pre><code>vm.onDisciplineCodeChange = function() {
                  if ('other' === vm.selectedDisciplineCode) {
                      vm.selectedDiscipline.code = null;
                      vm.selectedDiscipline.userDefined = true;
                  } else if('' === vm.selectedDisciplineCode) {
                      vm.selectedDiscipline = {
                          code: null,
                          userDefined: false,
                          userDefinedDiscipline: null
                      }
                  } else {
                      vm.selectedDiscipline = {
                          code: vm.selectedDisciplineCode,
                          userDefined: false,
                          userDefinedDiscipline: null
                      }
                  }
                  vm.onDisciplineUpdated({discipline: vm.selectedDiscipline});
              };
  </code></pre>
  
  <p>I'm quite new to unit testing and following is the output i'm getting in generated report.</p>
  
  <p><a href="https://i.stack.imgur.com/rLTk9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rLTk9.png" alt="enter image description here"></a></p>