-
Notifications
You must be signed in to change notification settings - Fork 0
Bugfix/#139 - iCloud 동기화 Pro 전용 게이팅 및 App Sandbox 배포 설정 #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dlguszoo
wants to merge
9
commits into
develop
Choose a base branch
from
bugfix/#139
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1303f74
[#139] fix: iCloud 동기화를 Pro 전용으로 게이팅
dlguszoo 47ae36f
[#139] feat: 온보딩 Enable Sync를 페이월로 연결
dlguszoo 3830f63
[#139] chore: App Sandbox·CloudKit 엔타이틀먼트 추가 및 빌드 번호 40
dlguszoo 3f0b18b
[#139] fix: HelpMenuLinkTests, EntitlementClient 테스트 깨짐 수정
dlguszoo c6ae0c6
[#139] fix: iCloud Pro 게이팅·다운그레이드 차단을 fail-safe로 강화
dlguszoo cb8c5c3
[#139] fix: macOS APNs entitlement 키 교정
dlguszoo 62cec7f
[#139] fix: 예약된 플랜 변경 노출 정확도 개선
dlguszoo f8dbad7
[#139] test: EntitlementClient testValue의 current 안전망 복원
dlguszoo c6a0136
[#139] test: 피드백 URL의 Plan 값이 등급을 반영하는지 검증
dlguszoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...s/DVData/Tests/RepositoryImpl/Settings/SettingsRepositoryImplSubscriptionCacheTests.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| // Copyright © 2026 Devault. All rights reserved | ||
|
|
||
| import Foundation | ||
| import Testing | ||
|
|
||
| import DVDomain | ||
| @testable import DVData | ||
|
|
||
| @Suite("SettingsRepositoryImpl - 구독 상태 캐시") | ||
| struct SettingsRepositoryImplSubscriptionCacheTests { | ||
|
|
||
| private func makeSUT() -> SettingsRepositoryImpl { | ||
| let defaults = UserDefaults(suiteName: "SettingsRepositoryImplTests.\(UUID().uuidString)")! | ||
| return SettingsRepositoryImpl(defaults: defaults) | ||
| } | ||
|
|
||
| @Test("예약된 플랜 변경(renewalProductID)이 캐시 왕복에서 보존된다") | ||
| func renewalProductIDSurvivesRoundTrip() { | ||
| let sut = makeSUT() | ||
| sut.setCachedEntitlement(.pro) | ||
| sut.setCachedSubscriptionStatus( | ||
| SubscriptionStatus( | ||
| entitlement: .pro, | ||
| productID: "pro.monthly", | ||
| renewsAt: Date(timeIntervalSince1970: 1_700_000_000), | ||
| willAutoRenew: true, | ||
| renewalProductID: "pro.yearly" | ||
| ) | ||
| ) | ||
|
|
||
| let restored = sut.cachedSubscriptionStatus() | ||
|
|
||
| #expect(restored.renewalProductID == "pro.yearly") | ||
| #expect(restored.hasPendingPlanChange) | ||
| } | ||
|
|
||
| @Test("예약이 없으면 renewalProductID는 nil로 복원된다") | ||
| func renewalProductIDClearedWhenAbsent() { | ||
| let sut = makeSUT() | ||
| sut.setCachedEntitlement(.pro) | ||
| // 예약이 있던 상태를 | ||
| sut.setCachedSubscriptionStatus( | ||
| SubscriptionStatus(entitlement: .pro, productID: "pro.monthly", willAutoRenew: true, renewalProductID: "pro.yearly") | ||
| ) | ||
| // 예약 없는 상태로 덮어쓰면 캐시에서도 지워져야 한다 | ||
| sut.setCachedSubscriptionStatus( | ||
| SubscriptionStatus(entitlement: .pro, productID: "pro.monthly", willAutoRenew: true, renewalProductID: nil) | ||
| ) | ||
|
|
||
| #expect(sut.cachedSubscriptionStatus().renewalProductID == nil) | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: DevaultProject/Devault-macOS
Length of output: 5241
🤖 get_repo_knowledge executed:
get_repo_knowledge DevaultProject/Devault-macOS /tmp/coderabbit-repo-knowledge/devaultproject-devault-macos-d20c2bd6/conventionsLength of output: 4530
🏁 Script executed:
Repository: DevaultProject/Devault-macOS
Length of output: 5208
강제 언래핑을 제거하세요.
UserDefaults(suiteName:)는UserDefaults?를 반환하므로 suite 생성에 실패하면 테스트가 중단됩니다.makeSUT()를throws로 변경하고guard let으로 처리하세요. 두 테스트 함수에throws를 추가하고 호출부에서try makeSUT()를 사용하세요.🤖 Prompt for AI Agents
Source: Path instructions