spec/misc/misc_spec.rb in gratan-0.3.1.beta2 vs spec/misc/misc_spec.rb in gratan-0.3.1.beta3
- old
+ new
@@ -29,19 +29,20 @@
end
expect(show_grants).to match_array [
"GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'scott'@'localhost' IDENTIFIED BY PASSWORD '*F2F68D0BB27A773C1D944270E5FAFED515A3FA40'",
"GRANT SELECT, INSERT, UPDATE, DELETE ON `test`.* TO 'scott'@'localhost'",
- ]
+ ].normalize
end
end
context 'when set debug' do
let(:logger) do
logger = Gratan::Logger.send(:new)
logger.set_debug(true)
expect(logger).to receive(:debug).with("[DEBUG] SET SQL_LOG_BIN = 0")
+ allow(logger).to receive(:debug).with('[DEBUG] SET SQL_MODE = ""')
expect(logger).to receive(:debug).with("[DEBUG] SELECT user, host FROM mysql.user")
expect(logger).to receive(:info).with("GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'scott'@'localhost' IDENTIFIED BY 'tiger'")
expect(logger).to receive(:info).with("GRANT SELECT, INSERT, UPDATE, DELETE ON `test`.* TO 'scott'@'localhost' IDENTIFIED BY 'tiger'")
expect(logger).to receive(:info).with("FLUSH PRIVILEGES")
logger
@@ -71,9 +72,9 @@
}
expect(show_grants).to match_array [
"GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'scott'@'localhost' IDENTIFIED BY PASSWORD '*F2F68D0BB27A773C1D944270E5FAFED515A3FA40'",
"GRANT SELECT, INSERT, UPDATE, DELETE ON `test`.* TO 'scott'@'localhost'",
- ]
+ ].normalize
end
end
end