Skip to content

Commit

Permalink
Add logging statement to check if permission is successfully changed …
Browse files Browse the repository at this point in the history
…or not
  • Loading branch information
maniSHarma7575 committed Apr 27, 2024
1 parent d4590e5 commit ad46ed1
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -25,7 +25,12 @@ def setup

def test_bad_connection
Dir.mktmpdir do |dir|
File.chmod(0x000, dir)
result = File.chmod(0x000, dir)
if result == 1
puts "Permissions changed successfully for #{dir}"
else
puts "Error: Permissions couldn't be changed for #{dir}"
end
db_path = File.join(dir, "db/cant-be-created.db")
error = assert_raise ActiveRecord::NoDatabaseError do
connection = SQLite3Adapter.new(adapter: "sqlite3", database: db_path)
Expand Down

0 comments on commit ad46ed1

Please sign in to comment.