-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdatabase_spec.rb
More file actions
41 lines (36 loc) · 962 Bytes
/
database_spec.rb
File metadata and controls
41 lines (36 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# frozen_string_literal: true
RSpec.describe Metabase::Endpoint::Database do
include_context 'login'
describe 'databases', vcr: true do
context 'success' do
it 'returns all databases' do
databases = client.databases
expect(databases).to be_kind_of(Array)
end
end
end
describe 'database', vcr: true do
context 'success' do
it 'returns a database' do
database = client.database(1)
expect(database).to be_kind_of(Hash)
end
end
end
describe 'schemas', vcr: true do
context 'success' do
it 'returns all schemas of a database' do
schemas = client.schemas(1)
expect(schemas).to be_kind_of(Array)
end
end
end
describe 'schema', vcr: true do
context 'success' do
it 'returns all tables of a schema of a database' do
tables = client.schema(1, "PUBLIC")
expect(tables).to be_kind_of(Array)
end
end
end
end