FirehoseCommunity / DEFCON

6 stars 4 forks source link

Add post validations #98

Closed nicolaguidi closed 8 years ago

nicolaguidi commented 8 years ago

I also added a jquery plugin to validate data before submitting the post. For some reason I couldn't get the body of a new post to work.

nicolaguidi commented 8 years ago

I'm deleting those tests, I believe is overkill to add a gem for a couple of tests. Also: I'd like to know what is your opinion on what to test and what not to; I still struggle to make these decisions.

kenmazaika commented 8 years ago

I personally think it's overkill to test specific validations (although testing the case in controllers where things are invalid makes sense).

One of my coworkers was adamant about testing everything, and he was a solid developer. Different developers feel differently on the topic, which is probably why it's a bit hard to know what opinion to have.

I'd say just remove the tests.

kenmazaika commented 8 years ago

@nicolaguidi can you resolve the merge conflicts? After that we can merge this in.

nicolaguidi commented 8 years ago

Solved the merge conflicts. I couldn't run the migration on my machine, not sure this can affect the merge commit.

kenmazaika commented 8 years ago

Do the migrations give you errors @nicolaguidi? If so, we should probably open a ticket to fix those!

nicolaguidi commented 8 years ago

It's probably related to my local postgres installation, this is the error I'm getting:

could not connect to server: Connection refused
    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
...
kenmazaika commented 8 years ago

Hmmm. Looks like it is. I might suggest reworking you vagrant setup.

vagrant destroy
vagrant up

And then setting up your SSH keys.

Then your postgres should be working (assuming you're using vagrant).