Initial commit

This commit is contained in:
Yaser
2026-08-13 19:50:53 +03:30
commit 38084458fe
879 changed files with 95198 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# encoding: UTF-8
# frozen_string_literal: true
describe API::V2::Management::Tools, type: :request do
before do
defaults_for_management_api_v1_security_configuration!
management_api_v1_security_configuration.merge! \
scopes: {
tools: { permitted_signers: %i[alex jeff], mandatory_signers: %i[jeff] }
}
end
describe 'management/timestamp' do
let(:data) { {} }
let(:signers) { %i[jeff] }
def request
post_json '/api/v2/management/timestamp',
multisig_jwt_management_api_v1({ data: data }, *signers)
end
it 'returns current time in seconds' do
now = Time.now
request
expect(response).to be_successful
expect(JSON.parse(response.body).fetch('timestamp')).to be_between(now.iso8601, (now + 1).iso8601)
end
end
end