|
12 | 12 |
|
13 | 13 | describe "#can_sync?" do
|
14 | 14 | it "should return false when disabled via site setting" do
|
15 |
| - SiteSetting.discourse_backups_drive_enabled = false |
16 |
| - SiteSetting.discourse_backups_drive_api_key = 'test_key' |
| 15 | + SiteSetting.discourse_sync_to_googledrive_enabled = false |
| 16 | + SiteSetting.discourse_sync_to_googledrive_api_key = 'test_key' |
17 | 17 | ds = described_class.new(backup)
|
18 | 18 | expect(ds.can_sync?).to eq(false)
|
19 | 19 | end
|
20 | 20 |
|
21 | 21 | it "should return false when the backup is missing" do
|
22 |
| - SiteSetting.discourse_backups_drive_enabled = true |
23 |
| - SiteSetting.discourse_backups_drive_api_key = 'test_key' |
| 22 | + SiteSetting.discourse_sync_to_googledrive_enabled = true |
| 23 | + SiteSetting.discourse_sync_to_googledrive_api_key = 'test_key' |
24 | 24 | ds = described_class.new(nil)
|
25 | 25 | expect(ds.can_sync?).to eq(false)
|
26 | 26 | end
|
27 | 27 |
|
28 | 28 | it "should return false when the api key is missing" do
|
29 |
| - SiteSetting.discourse_backups_drive_enabled = true |
30 |
| - SiteSetting.discourse_backups_drive_api_key = '' |
| 29 | + SiteSetting.discourse_sync_to_googledrive_enabled = true |
| 30 | + SiteSetting.discourse_sync_to_googledrive_api_key = '' |
31 | 31 | ds = described_class.new(backup)
|
32 | 32 | expect(ds.can_sync?).to eq(false)
|
33 | 33 | end
|
34 | 34 |
|
35 | 35 | it "should return true when everything is correct" do
|
36 |
| - SiteSetting.discourse_backups_drive_enabled = true |
37 |
| - SiteSetting.discourse_backups_drive_api_key = 'test_key' |
| 36 | + SiteSetting.discourse_sync_to_googledrive_enabled = true |
| 37 | + SiteSetting.discourse_sync_to_googledrive_api_key = 'test_key' |
38 | 38 | ds = described_class.new(backup)
|
39 | 39 | expect(ds.can_sync?).to eq(true)
|
40 | 40 | end
|
|
0 commit comments