Skip to content

Commit

Permalink
story: user leaves install process early
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Fuchs committed Jul 10, 2008
1 parent 19bbe65 commit 59f36fd
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
1 change: 1 addition & 0 deletions README
Expand Up @@ -4,6 +4,7 @@ Rails 2.1

# Installation

* cp db/database.example.yml db/database.yml
* run rake db:migrate:all to setup the database (Sqlite for toying)
* start the server
* visit http://localhost:3000
Expand Down
1 change: 1 addition & 0 deletions TODO
Expand Up @@ -4,6 +4,7 @@ Please refer to the issue tracker at
http://artweb-design.lighthouseapp.com/projects/13992-adva_cms/overview



[theme] separate login and admin/login pages (same thing, different layout) ?
[feature] admin section: have an activity center/dashboard where engines can register their
widgets (partials) to. e.g.: "x comments are awaiting your approval",
Expand Down
5 changes: 5 additions & 0 deletions stories/steps/site.rb
Expand Up @@ -74,4 +74,9 @@
Then "the page has a site install form" do
response.should have_form_posting_to(install_path)
end

Then "the user sees an empty homepage" do
request.request_uri.should == '/'
response.should render_template('section/show')
end
end
16 changes: 15 additions & 1 deletion stories/stories/admin/install.txt
Expand Up @@ -15,4 +15,18 @@ Story: Installing the initial site (and admin account)
And the root section is saved
And an admin account is created
And the admin account is verified
And the system authenticates the user as superuser
And the system authenticates the user as superuser

Story: Viewing an empty frontend after installation
As a user
I want to access the frontend after installation without doing anything else
So I can leave the admin interface early

Scenario:
Given no site exists
And no user exists
When the user goes to the url /
When the user fills in the site install form with valid values
And the user clicks the 'Create' button
When the user clicks on 'logout'
Then the user sees an empty homepage
Expand Up @@ -30,7 +30,7 @@ def set_article
end

def guard_view_permissions
unless @article.published?
if @article && @article.draft?
guard_permission(:update, :article)
@skip_caching = true
end
Expand Down
7 changes: 1 addition & 6 deletions vendor/engines/adva_wiki/app/models/wikipage.rb
Expand Up @@ -2,16 +2,11 @@ class Wikipage < Content
filters_attributes :sanitize => :body, :except => [:body_html, :cached_tag_list] # TODO hu?? why is body_html excluded?
before_create :set_published

# TODO I don't think we need this any more
# def full_permalink
# { :id => permalink }
# end

def after_initialize
self.title = permalink.to_s.gsub("-", " ").capitalize if new_record? && title.blank? && permalink
end

def set_published # TODO hu??
def set_published # TODO hu?? why not just ignore this?
self.published_at = Time.zone.now
end

Expand Down

0 comments on commit 59f36fd

Please sign in to comment.