-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from sproogen/develop
Version 2.2.0
- Loading branch information
Showing
96 changed files
with
12,278 additions
and
2,387 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170814224911 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE poll ADD end_date DATETIME DEFAULT NULL, ADD ended TINYINT(1) NOT NULL'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE poll DROP end_date, DROP ended'); | ||
} | ||
} |
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
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
1 change: 1 addition & 0 deletions
1
app/Resources/client/tests/test-bundler.js → app/Resources/client/build/test-bundler.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* eslint-env mocha */ | ||
import 'normalize.js' | ||
import chai from 'chai' | ||
import sinon from 'sinon' | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* eslint-env mocha */ | ||
/* global expect, sinon */ | ||
import React from 'react' | ||
import { browserHistory } from 'react-router' | ||
import Back from 'components/Back' | ||
import { shallow, mount } from 'enzyme' | ||
|
||
describe('(Component) Back', () => { | ||
const wrapper = shallow(<Back />) | ||
|
||
describe('(Render) Back', () => { | ||
it('renders as a Back', () => { | ||
const wrapper = mount(<Back />) | ||
|
||
expect(wrapper.name()).to.equal('Back') | ||
}) | ||
|
||
it('renders as a .container', () => { | ||
expect(wrapper.name()).to.equal('div') | ||
expect(wrapper.hasClass('container')).to.equal(true) | ||
}) | ||
|
||
it('Should render the icon and text', () => { | ||
wrapper.find('a').should.contain(<i className='fa fa-arrow-left' />) | ||
expect(wrapper.find('a').text()).to.equal(' New Poll') | ||
}) | ||
|
||
describe('clickEvent', () => { | ||
const wrapper = mount(<Back />) | ||
const spy = sinon.spy(browserHistory, 'push') | ||
|
||
it('Should call submit', () => { | ||
wrapper.find('a').simulate('click') | ||
spy.should.have.been.calledWith('/') | ||
}) | ||
}) | ||
}) | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Back from './Back' | ||
|
||
export default Back |
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
Oops, something went wrong.