Sha256: 0916795f49b0054f3f05e2690d99939de5b7395836656622e9de67c616f514df

Contents?: true

Size: 589 Bytes

Versions: 3

Compression:

Stored size: 589 Bytes

Contents

# typed: false
# frozen_string_literal: true

require "test_helper"

class SettingsControllerTest < ActionDispatch::IntegrationTest
  include API::TestHelpers

  include Webmocks::Yetto

  test "GET /settings without asking for JSON fails" do
    api(:get, "/settings", headers: nil)

    assert_response :not_acceptable
  end

  test "GET /settings asking for JSON works" do
    settings_json = api(:get, "/settings")

    assert_response :ok

    settings = settings_json["settings"]

    assert_equal "2023-03-06", settings_json["version"]
    assert_equal 2, settings.length
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hephaestus-0.1.3 templates/test/controllers/settings_controller_test.rb
hephaestus-0.1.2 templates/test/controllers/settings_controller_test.rb
hephaestus-0.1.1 templates/test/controllers/settings_controller_test.rb