Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use plural
  • Loading branch information
Leo Arias committed Aug 28, 2018
commit b4255dda453a77ff7663ee89f9ae12fa854aa0fe
4 changes: 2 additions & 2 deletions contracts/crowdsale/Crowdsale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract Crowdsale {
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchased(
event TokensPurchased(
address indexed purchaser,
address indexed beneficiary,
uint256 value,
Expand Down Expand Up @@ -92,7 +92,7 @@ contract Crowdsale {
weiRaised = weiRaised.add(weiAmount);

_processPurchase(_beneficiary, tokens);
emit TokenPurchased(
emit TokensPurchased(
msg.sender,
_beneficiary,
weiAmount,
Expand Down
2 changes: 1 addition & 1 deletion test/crowdsale/AllowanceCrowdsale.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ contract('AllowanceCrowdsale', function ([_, investor, wallet, purchaser, tokenW
describe('high-level purchase', function () {
it('should log purchase', async function () {
const { logs } = await this.crowdsale.sendTransaction({ value: value, from: investor });
const event = logs.find(e => e.event === 'TokenPurchased');
const event = logs.find(e => e.event === 'TokensPurchased');
should.exist(event);
event.args.purchaser.should.equal(investor);
event.args.beneficiary.should.equal(investor);
Expand Down
4 changes: 2 additions & 2 deletions test/crowdsale/Crowdsale.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
describe('high-level purchase', function () {
it('should log purchase', async function () {
const { logs } = await this.crowdsale.sendTransaction({ value: value, from: investor });
const event = logs.find(e => e.event === 'TokenPurchased');
const event = logs.find(e => e.event === 'TokensPurchased');
should.exist(event);
event.args.purchaser.should.equal(investor);
event.args.beneficiary.should.equal(investor);
Expand All @@ -106,7 +106,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
describe('low-level purchase', function () {
it('should log purchase', async function () {
const { logs } = await this.crowdsale.buyTokens(investor, { value: value, from: purchaser });
const event = logs.find(e => e.event === 'TokenPurchased');
const event = logs.find(e => e.event === 'TokensPurchased');
should.exist(event);
event.args.purchaser.should.equal(purchaser);
event.args.beneficiary.should.equal(investor);
Expand Down
2 changes: 1 addition & 1 deletion test/crowdsale/MintedCrowdsale.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function shouldBehaveLikeMintedCrowdsale ([_, investor, wallet, purchaser], rate
describe('high-level purchase', function () {
it('should log purchase', async function () {
const { logs } = await this.crowdsale.sendTransaction({ value: value, from: investor });
const event = logs.find(e => e.event === 'TokenPurchased');
const event = logs.find(e => e.event === 'TokensPurchased');
should.exist(event);
event.args.purchaser.should.equal(investor);
event.args.beneficiary.should.equal(investor);
Expand Down