Sha256: f1fda1f2445c6421e04b4704f1e5edc35d291ae3bdece30f3da9393e565c4862

Contents?: true

Size: 571 Bytes

Versions: 22

Compression:

Stored size: 571 Bytes

Contents

require "test_helper"

class ActionTest < ActiveSupport::TestCase
  test "#to_s should return the humanized version of the request type" do
    assert_equal "Approve review", Action.new(request_type: 'approve_review').to_s
  end

  test "#to_s should contain the scheduled time when request type is SCHEDULE_FOR_PUBLISHING" do
    assert_equal "Scheduled for publishing on 12/12/2014 00:00 UTC",
      Action.new(:request_type => 'schedule_for_publishing',
                 :request_details => { 'scheduled_time' => Date.parse('12/12/2014').to_time.utc }).to_s
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
govuk_content_models-28.7.0 test/models/action_test.rb
govuk_content_models-28.6.2 test/models/action_test.rb
govuk_content_models-28.6.1 test/models/action_test.rb
govuk_content_models-28.6.0 test/models/action_test.rb
govuk_content_models-28.5.0 test/models/action_test.rb
govuk_content_models-28.4.0 test/models/action_test.rb
govuk_content_models-28.3.0 test/models/action_test.rb
govuk_content_models-28.2.0 test/models/action_test.rb
govuk_content_models-28.1.0 test/models/action_test.rb
govuk_content_models-28.0.1 test/models/action_test.rb
govuk_content_models-28.0.0 test/models/action_test.rb
govuk_content_models-27.2.0 test/models/action_test.rb
govuk_content_models-27.1.0 test/models/action_test.rb
govuk_content_models-27.0.0 test/models/action_test.rb
govuk_content_models-26.2.0 test/models/action_test.rb
govuk_content_models-26.1.0 test/models/action_test.rb
govuk_content_models-26.0.0 test/models/action_test.rb
govuk_content_models-25.0.0 test/models/action_test.rb
govuk_content_models-24.2.0 test/models/action_test.rb
govuk_content_models-24.1.0 test/models/action_test.rb