Files
DualFloatingClock/tests/autostart_manager_test.cpp
T
sebastian 6b9cb32534 feat: dual time zones, autostart, tray icon, config relocation, tests
- Dual clock (primary/secondary time zone) with IANA picker, persisted in XML
- AutoStartManager: macOS LaunchAgent (com.clouck.clock, RunAtLoad)
- Tray icon: template image, light/dark adaptation, toggle + quit menu
- ConfigManager: default path moved to QStandardPaths::AppConfigLocation
- Qt Test suite (ConfigManager, AutoStartManager) wired into CTest
- GitHub origin renamed to upstream; private Gitea repo as origin
2026-08-19 21:09:06 +03:00

27 lines
692 B
C++

#include "autostart_manager.h"
#include <QtTest>
class AutoStartManagerTest : public QObject
{
Q_OBJECT
private slots:
void createsRunAtLoadLaunchAgent();
};
void AutoStartManagerTest::createsRunAtLoadLaunchAgent()
{
const QString executablePath = "/Applications/Clouck.app/Contents/MacOS/Clouck";
const QString contents = AutoStartManager::launchAgentContents(executablePath);
QVERIFY(contents.contains("<key>ProgramArguments</key>"));
QVERIFY(contents.contains(executablePath));
QVERIFY(contents.contains("<key>RunAtLoad</key>"));
QVERIFY(contents.contains("<true/>"));
}
QTEST_APPLESS_MAIN(AutoStartManagerTest)
#include "autostart_manager_test.moc"