Support validation

supporting-an-initiative-test works but making-a-suggestion-test breaks
still not that clear on how to test something doesn't exist without adding
something new. For the title and description missing test, there is existed
textarea to test blank or not. For the missing link, i guess i need to use
something existing to test it ?


On Wed, Aug 20, 2014 at 2:04 PM, Oliver Azevedo Barnes <
notifications@github.com> wrote:

> In tests/acceptance/making-a-suggestion-to-initiative-test.js:
>
> > @@ -16,13 +16,16 @@ suite('Making a suggestion to an initiative', {
> >
> >  test('Successfully', function(){
> >    visit('/initiatives/1').then(function() {
> > -    click( $("a:contains('Make a suggestion')") ).then(function() {
> > -      expect(currentURL()).to.equal('/initiatives/1/suggestions/new');
> > -      fillIn('div.details textarea', "Make sure there's a doctor available for house calls");
> > -      click('form input[type=submit]').then(function() {
> > -        expect(currentURL()).to.equal('/initiatives/1/suggestions');
> > -        expect(find('.suggestion').first().text()).to.equal("Make sure there's a doctor available for house calls");
> > +    click( $("a:contains('Support this initiative')") ).then(function() {
>
> No, I don't mean a behavior change (thought that's an idea we can discuss
> in the future). I mean testing for the presence of the note (moving the
> assertion you have for it under the supporting initiative test, to this
> one), and testing the absence of the link to create the suggestion. That's
> how you'll test the validation fully, and under the right context
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/oliverbarnes/participate-frontend/pull/37/files#r16469480>
> .
>