Skip to content

Commit

Permalink
Ensure that the settings are right for submitting news.
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1m committed May 13, 2009
1 parent aeffa10 commit 5634a9d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion features/news/submit.feature
Expand Up @@ -4,7 +4,9 @@ Feature: Users Submit News
I want to submit news

Background:
Given I am signed in as a user
Given setting "News Page" in category "Features" is enabled
And setting "News by Users" in category "Features" is enabled
And I am signed in as a user

Scenario: User sees no news when there are no posts
Given there are no news items
Expand Down
2 changes: 1 addition & 1 deletion features/step_definitions/news_steps.rb
Expand Up @@ -6,4 +6,4 @@
:title => title,
:body => body
)
end
end
8 changes: 8 additions & 0 deletions features/step_definitions/setting_steps.rb
@@ -0,0 +1,8 @@
Given /^setting "([^\"]*)" in category "([^\"]*)" is (.+)$/ do |name, category, value|
value = case value
when 'enabled' then true
when 'disabled' then false
else value
end
Setting.set(Site.current.id, category, name, value)
end

0 comments on commit 5634a9d

Please sign in to comment.