// // SharePermissionTest.swift // Nextcloud // // Created by Henrik Storch on 29.03.22. // Copyright © 2021 Henrik Storch. All rights reserved. // // Author Henrik Storch // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // @testable import Nextcloud import XCTest import NextcloudKit class SharePermissionTest: XCTestCase { override func setUp() { let json = """ {"ocs":{"data":{"capabilities":{"files_sharing":{"default_permissions":31}}}}} """.data(using: .utf8)! NCManageDatabase.shared.addCapabilitiesJSon(json, account: "") } func testShareCellPermissionCell() throws { let share = NCTableShareOptions(sharee: NKSharee(), metadata: tableMetadata(), password: nil) let shareConfig = NCShareConfig(parentMetadata: tableMetadata(), share: share) for row in 0..