This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# basic auth settings | |
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/users.txt | |
auth_param basic children 2 | |
auth_param basic realm nighttrax | |
auth_param basic casesensitive on | |
acl Users proxy_auth REQUIRED | |
http_access allow Users | |
# acl | |
acl manager proto cache_object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIFF_PATH=/tmp/diff.png | |
MONTAGE_PATH=/tmp/montage.png | |
rm -rf $DIFF_PATH $MONTAGE_PATH | |
# Try to diff the images and create a montage with the original on | |
# the left, diff in the middle and the new one on the right. | |
DIFF=$(compare $2 $1 png:- > $DIFF_PATH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should display the name of the todo', function() { | |
render(<Todo name="buy milk" />); | |
expect($('.todo').text()).to.equal('buy milk'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Todo(props) { | |
return <div> | |
<span>{props.name}</span> | |
</div>; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should delete the todo when clicking on the delete button', function() { | |
const deleteTodo = sinon.spy(); | |
render(<Todo name=”buy milk” onDelete={deleteTodo} />); | |
Simulate.click($(‘.delete’)[0]); | |
expect(deleteTodo).to.have.been.called; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Todo(props) { | |
return <div> | |
<span>{props.name}</span> | |
<button onClick={props.onDelete}>Delete</button> | |
</div>; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createSpy() { | |
const _renderSpy = sinon.spy(); | |
return class Spy extends Component { | |
static get lastProps() { | |
return _renderSpy.args[_renderSpy.callCount - 1][0]; | |
} | |
render() { | |
_renderSpy(this.props); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should delete the todo when using the delete button', function() { | |
const Delete = createSpy(); | |
const onDeleteSpy = spy(); | |
render(<Todo Delete={Delete} name="buy milk" onDelete={onDeleteSpy} />); | |
Delete.lastProps.onSubmit(); | |
expect(onDeleteSpy).to.have.been.called; | |
}); |
OlderNewer