Page 1 of 1
Progress
Posted: Mon Aug 11, 2014 11:05 pm
by LNitewing
Email confirmation works! SendGrid as I mentioned in another post has a small free package. It allows you to send 200 emails per day, that's 200 tests per day!

The best part is that I can test this all locally now.
I got it setup to send the email for confirmation and the confirmation works locally. The link in the following screenshot was an actual confirmation link (it doesn't exist so no use trying it

)

Re: Progress
Posted: Mon Aug 11, 2014 11:06 pm
by Chris
Watch out for phishing scams. How do you test this? Unit testing?
Re: Progress
Posted: Mon Aug 11, 2014 11:11 pm
by LNitewing
You always have to be on the lookout for phishing scams!
I could actually use unit tests if I wanted to. However, I've been testing manually using LocalDB and a local IIS8 installation.

Re: Progress
Posted: Tue Aug 12, 2014 1:04 am
by LNitewing
Password Reset is working now as well!

Re: Progress
Posted: Tue Aug 12, 2014 9:45 am
by Chris
Oh, I was quite keen on knowing how you had set up unit testing with emails

Re: Progress
Posted: Tue Aug 12, 2014 12:30 pm
by OldRod
Pardon my ignorance... what is unit testing?
Re: Progress
Posted: Tue Aug 12, 2014 4:07 pm
by LNitewing
"At a high-level, unit testing refers to the practice of testing certain functions and areas – or units – of our code. This gives us the ability to verify that our functions work as expected. That is to say that for any function and given a set of inputs, we can determine if the function is returning the proper values and will gracefully handle failures during the course of execution should invalid input be provided."
http://code.tutsplus.com/articles/the-b ... --wp-25728
It's essentially automated testing, some people are for it and some aren't. I've always been the manual kind of guy myself.
EDIT: If I was going to implement unit testing for my email service, I would use
https://github.com/cmendible/netDumbster which is a fake SMTP server. I would then setup to use a local SMTP server (localhost) rather than using relay servers that I'm currently using. Then you setup the controller and the method that calls the sendmail function and then send. After that you could check the SMTP instance in code to see if it received the mail and if the contents match. I don't have any code for it as I haven't setup the unit tests project.
Re: Progress
Posted: Wed Aug 13, 2014 5:21 am
by LNitewing
Basic authorization is setup. I had to create my own authorize attribute and override the unauthorized function but it works now. When you're authenticated but don't have the correct role for the page, it shows you this page.
Don't mind that its unformatted and ugly. This is all about functionality at the moment.

Re: Progress
Posted: Thu Aug 14, 2014 8:43 pm
by LNitewing
It looks pretty-ish again!

It looks the same as the post in "Actual Site Layout" right now. I had rewritten parts of it to use the new Identity 2.0 authentication system over the old 1.0 version.
Now that I got things up and running and jQuery-UI back to working as well, I can work on finishing the designing/deuglification process.

Re: Progress
Posted: Fri Aug 15, 2014 7:22 am
by LNitewing
I finished the home page (in perfect working order), cleaned up how I did the jQuery stuff as well. Since this was a HTML5 website anyway, I took advantage of it's custom data attributes when dealing with the interface stuff instead of making rather long function calls to my JavaScript file.
This is the home page while not authenticated:
This is the home page while authenticated:
This is the current state of the play buttons if anyone was curious
