Ember Quint

by amindunited

HTML

<link REL="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css"></link>

<button>Button_1</button>
<script type="text/x-handlebars" data-template-name="application">
    <h1>
        Top of application
    </h1>
    
</script>


<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.2/raphael-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.5.1/ember.min.js"></script>

JavaScript

App = Em.Application.create();
App.Router.map(function(){
    this.resource('employees', {path:'employees'}, function(){
        this.route('index');
        this.resource('employee', {path:'employee/:id'}, function(){
        
        });
    });
});


test('Button Should Have text "Button_1"', function(){
    var button_text = $('button').text();
    ok(button_text == "Button_1", "That is the correct text!");
});

test('Trying to fail: "Button_2"', function(){
    var button_text = $('button').text();
    ok(button_text == "Button_2", "This was supposed to fail!");
});