Sha256: 1356b774cb368faf29d642d76ae9b3f7b9420992e9acd7a56070c45efa0ef1fb
Contents?: true
Size: 1.54 KB
Versions: 54
Compression:
Stored size: 1.54 KB
Contents
module GovukContentModels module TestHelpers module ActionProcessorHelpers def request_review(user, edition) user.progress(edition, { request_type: :request_review, comment: "Review this edition please." }) end def approve_review(user, edition) user.progress(edition, { request_type: :approve_review, comment: "I've reviewed it" }) end def send_fact_check(user, edition, comment="Fact check this guide please.") user.progress(edition,{ request_type: :send_fact_check, comment: comment, email_addresses: "test@test.com" }) end def receive_fact_check(user, edition, comment="Please verify these facts.") user.progress(edition, { request_type: :receive_fact_check, comment: comment }) end def approve_fact_check(user, edition, comment="No changes needed, this is all correct") user.progress(edition, { request_type: :approve_fact_check, comment: comment }) end def request_amendments(user, edition) user.progress(edition, { request_type: :request_amendments, comment: "More amendments are required" }) end def publish(user, edition, comment='Yo!') user.progress(edition, { request_type: :publish, comment: comment }) end def schedule_for_publishing(user, edition, action_attributes) user.progress(edition, { request_type: :schedule_for_publishing, publish_at: action_attributes[:publish_at] || Time.zone.now.utc, comment: action_attributes[:comment] || 'Schedule!' }) end end end end
Version data entries
54 entries across 54 versions & 1 rubygems