require 'test_helper'

class ServiceTokenServiceTest < ActiveSupport::TestCase
  def test_update_backend
    token = ServiceToken.new(value: 'foo', service_id: 42)

    ThreeScale::Core::ServiceToken.expects(:save!)
      .with({ 'foo' => { service_id: 42 } }).returns(true)

    ServiceTokenService.update_backend(token)
  end
end
