Permalink
Browse files

Merge pull request #14 from alphagov/new_feature_request_refinements

New feature request refinements
  • Loading branch information...
2 parents 47981f0 + 83d755f commit 902df6a40e1c47be3f20054de33df83f53b95230 @alext alext committed Nov 28, 2012
@@ -19,10 +19,9 @@ def inside_government_related?
def request_context_options
[
- ["Mainstream GOV.UK", "mainstream"],
- ["Inside Government", "inside_government"],
["Detailed Guidance", "detailed_guidance"],
- ["Other/Not sure", "other"]
+ ["Inside Government", "inside_government"],
+ ["Mainstream (business/citizen)", "mainstream"],
]
end
end
@@ -10,8 +10,8 @@ Feature: Content change requests
Scenario: successful Mainstream content change request
When the user submits the following content change request:
- | Context | Details of change | URL 1 | URL 2 | Needed by date | Not before date | Reason |
- | Mainstream GOV.UK | Out of date XX YY | http://gov.uk/X | http://gov.uk/Y | 31-12-2020 | 01-12-2020 | New law |
+ | Context | Details of change | URL 1 | URL 2 | Needed by date | Not before date | Reason |
+ | Mainstream (business/citizen) | Out of date XX YY | http://gov.uk/X | http://gov.uk/Y | 31-12-2020 | 01-12-2020 | New law |
Then the following ticket is raised in ZenDesk:
| Subject | Requester email | Requester name | Phone | Job title | Organisation |
@@ -23,7 +23,7 @@ Feature: Content change requests
And the comment on the ticket is:
"""
[Which part of GOV.UK is this about?]
- Mainstream GOV.UK
+ Mainstream (business/citizen)
[URl(s) of content to be changed]
http://gov.uk/X
@@ -11,11 +11,12 @@ def initialize(request)
end
def subject
- "New Feature Request"
+ @request.inside_government_related? ? "New Feature Request" : "New Need Request"
end
def tags
- ["new_feature_request"] + inside_government_tag_if_needed
+ specific_tag = @request.inside_government_related? ? ["new_feature_request"] : ["new_need_request"]
+ specific_tag + inside_government_tag_if_needed
end
# the following methods will be pushed down to the superclass as soon as everything is converted to ActiveModel
@@ -12,5 +12,19 @@ def ticket_with(opts)
should "be tagged with inside_government" do
assert_equal ["new_feature_request", "inside_government"], ticket_with(:inside_government_related? => true).tags
end
+
+ should "have a subject" do
+ assert_equal "New Feature Request", ticket_with(:inside_government_related? => true).subject
+ end
+ end
+
+ context "a mainstream request" do
+ should "be tagged with new_need_request" do
+ assert_equal ["new_need_request"], ticket_with(:inside_government_related? => false).tags
+ end
+
+ should "have a subject" do
+ assert_equal "New Need Request", ticket_with(:inside_government_related? => false).subject
+ end
end
end

0 comments on commit 902df6a

Please sign in to comment.