Sha256: 7f2da4b1e2229cb0c6b20adf0f8585526f3729c7d72d714211ea13e93bfc7509

Contents?: true

Size: 567 Bytes

Versions: 35

Compression:

Stored size: 567 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",
      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

35 entries across 35 versions & 1 rubygems

Version Path
govuk_content_models-42.0.0 test/models/action_test.rb
govuk_content_models-41.1.1 test/models/action_test.rb
govuk_content_models-41.1.0 test/models/action_test.rb
govuk_content_models-41.0.0 test/models/action_test.rb
govuk_content_models-40.0.0 test/models/action_test.rb
govuk_content_models-39.0.0 test/models/action_test.rb
govuk_content_models-38.0.0 test/models/action_test.rb
govuk_content_models-37.0.0 test/models/action_test.rb
govuk_content_models-36.0.0 test/models/action_test.rb
govuk_content_models-35.0.1 test/models/action_test.rb
govuk_content_models-35.0.0 test/models/action_test.rb
govuk_content_models-34.0.0 test/models/action_test.rb
govuk_content_models-33.0.0 test/models/action_test.rb
govuk_content_models-32.3.1 test/models/action_test.rb
govuk_content_models-32.3.0 test/models/action_test.rb
govuk_content_models-32.2.0 test/models/action_test.rb
govuk_content_models-32.1.0 test/models/action_test.rb
govuk_content_models-32.0.0 test/models/action_test.rb
govuk_content_models-31.4.0 test/models/action_test.rb
govuk_content_models-31.3.0 test/models/action_test.rb