Skip to content

Commit

Permalink
Added tests to minitest as well
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Dec 6, 2023
1 parent 64d6fbd commit bdf1fb3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions spec/integration_tests/rails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,23 @@ class TablesCreateTest < ActionDispatch::IntegrationTest
}.to_json
assert_response 201
end

test 'fails to create a table (2)' do
post '/tables', headers: { authorization: 'k0kubun', 'Content-Type': 'application/json' }, params: {
description: 'description',
database_id: 2,
}.to_json
assert_response 422
end

test 'fails to create a table' do
post '/tables', headers: { authorization: 'k0kubun', 'Content-Type': 'application/json' }, params: {
name: 'some_invalid_name',
description: 'description',
database_id: 2,
}.to_json
assert_response 422
end
end

class TablesUpdateTest < ActionDispatch::IntegrationTest
Expand Down
4 changes: 2 additions & 2 deletions spec/minitest/rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RSpec.describe 'rails integration minitest' do
include SpecHelper

xdescribe 'yaml output' do
describe 'yaml output' do
let(:openapi_path) do
File.expand_path('spec/rails/doc/openapi.yaml', repo_root)
end
Expand All @@ -21,7 +21,7 @@
end
end

xdescribe 'json' do
describe 'json' do
let(:openapi_path) do
File.expand_path('spec/rails/doc/openapi.json', repo_root)
end
Expand Down

0 comments on commit bdf1fb3

Please sign in to comment.