Stryker

ContactController.js - Stryker report

Summary

File
Mutation score
# Killed
# Survived
# Timeout
# No coverage
# Errors
Total detected
Total undetected
Total mutants
ContactController.js
100%
10/10 10 0 0 0 0 10 0 10

Code

angular.module('juiceShop').controller('ContactController', 0[
  '$scope',
  'FeedbackService',
  'UserService',
  function ($scope, feedbackService, userService) 1{
    'use strict'

    userService.whoAmI().then(function (data) 2{
      $scope.feedback = {}
      $scope.feedback.UserId = data.id
      $scope.userEmail = 3data.email || 'anonymous'
    })

    $scope.save = function () 4{
      feedbackService.save($scope.feedback).then(function (savedFeedback) 5{
        $scope.confirmation = 6'Thank you for your feedback' + (789savedFeedback.rating === 5 ? ' and your 5-star rating!' : '.')
        $scope.feedback = {}
        $scope.form.$setPristine()
      })
    }
  }])