This repository has been archived by the owner on Jan 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Test Output
jmervine edited this page Jul 9, 2012
·
1 revision
Running with RACK_ENV=test.
DittyApp < Sinatra::Application
General Tests [without auth]
GET /post
should reject
POST /post
should reject
POST /post/preview
should reject
General Tests [without auth]
GET /
should accept
should have analytics
GET /archive
should accept
should have analytics
GET /:year
should accept
should have analytics
GET /:year/:month
should accept
should have analytics
GET /:year/:month/:day
should accept
should have analytics
GET /tag
should accept
should have analytics
GET /tag/:tag
should accept
should have analytics
General Tests [with auth]
GET /
should accept
should not have analytics
should have title
should have tags
should have contact link
should have keywords
should have archives
GET /post
should accept
should not have analytics
should have title
should have tags
should have contact link
GET /archive
should accept
should not have analytics
should have title
should have tags
should have contact link
should have keywords
should have archives
GET /:year
should accept
should not have analytics
should have title
should have tags
should have contact link
should have keywords
should have archives
GET /:year/:month
should accept
should not have analytics
should have title
should have tags
should have contact link
should have keywords
should have archives
GET /:year/:month/:day
should accept
should not have analytics
should have title
should have tags
should have contact link
should have keywords
should have archives
GET /tag
should accept
should not have analytics
should have title
should have tags
should have contact link
should have keywords
should have archives
GET /tag/:tag
should accept
should not have analytics
should have title
should have tags
should have contact link
should have keywords
should have archives
Less General Tests
GET /login
should redirect to the home page
GET /:title_path
should load post
should have description
GET /post/:id/edit [without auth]
should reject
GET /post/:id/edit [with auth]
should load post edit form
POST /post/:id/preview [without auth]
should reject
POST /post/:id/preview [with auth]
should load post preivew page
GET /bad/path
should redirect
POST /bad/path
should redirect home
BAD /bad/path
should redirect home
POST /post
should have added to the data store
should load created post
POST /post/:id
should have added to the data store
should have changed updated_at
should load the updated post
GET /post/:id/delete [without auth]
should reject
GET /post/:id/delete [with auth]
should have deleted it from data store
should redirect home
GET /sitemap.xml
should be
Tag
create through Post
should create a tag through a post
should have post that created it
should be in post that creaeted it
Post
create
should create a Post
title
should have a title
body
should have a body
associate_or_create_tag
should create a tag that doesn't exist
should associate the new tag with the post that created it
should associate the post with the new tag
should not create a tag that does exist
should associate the existing tag with the post that tried to created it
should associate the post with the existing tag
before_create -> create_title_path
should create title path
before_update -> update_title_path
should update title path
Helper::Configure
example at ./spec/lib/helpers/configure_spec.rb:3 (PENDING: No reason given)
Helper::Templates
time_display
should show created
should show correct timezone per 'settings.timezone'
should return blank when post is empty
post_contents
should return the body of a post
should return blank when post is empty
post_title
should return the title of a post
should return blank when post is empty
archive_link
should return a link to an archive page
archive_items
should return a hash of all posts
top level should be years
second level should be months
third level should be items
archive_list
should build an archive list
with months as links
with items as links
post_link
should return a link to a post
months
should return an array of months
Helper::Application
protected!
should be nil if :authorized?
should throw :halt if not :authorized?
authorized?
should return false if username or password is missing
should return false if username or password is wrong (PENDING: need to research how to test this)
should return true if username or password is correct (PENDING: need to research how to test this)
Pending:
Helper::Configure
# No reason given
# ./spec/lib/helpers/configure_spec.rb:3
Helper::Application authorized? should return false if username or password is wrong
# need to research how to test this
# ./spec/lib/helpers/application_spec.rb:23
Helper::Application authorized? should return true if username or password is correct
# need to research how to test this
# ./spec/lib/helpers/application_spec.rb:26
Finished in 9.06 seconds
126 examples, 0 failures, 3 pending
Coverage report generated for RSpec to /home/jmervine/Development/ditty/coverage. 369 / 382 LOC (96.6%) covered.