Skip to content

Commit

Permalink
Use a better method name
Browse files Browse the repository at this point in the history
  • Loading branch information
3lvis committed May 26, 2015
1 parent 89ff057 commit 4e0f405
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source/FORMData.m
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ - (NSArray *)updateTargets:(NSArray *)targets {
}];

if (field) {
NSArray *properties = [target fieldPropertiesToUpdate];
NSArray *properties = [target propertiesToUpdate];
for (NSString *propertyName in properties) {
id value = [target valueForKey:propertyName];

Expand Down
2 changes: 1 addition & 1 deletion Source/Models/FORMTarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ typedef NS_ENUM(NSInteger, FORMTargetActionType) {

- (instancetype)initWithDictionary:(NSDictionary *)dictionary NS_DESIGNATED_INITIALIZER;

- (NSArray *)fieldPropertiesToUpdate;
- (NSArray *)propertiesToUpdate;

+ (void)filteredTargets:(NSArray*)targets
filtered:(void (^)(NSArray *shownTargets,
Expand Down
2 changes: 1 addition & 1 deletion Source/Models/FORMTarget.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ - (instancetype)initWithDictionary:(NSDictionary *)dictionary {

#pragma mark - Public Methods

- (NSArray *)fieldPropertiesToUpdate {
- (NSArray *)propertiesToUpdate {
NSMutableArray *values = [NSMutableArray new];

if (self.actionType == FORMTargetActionUpdate &&
Expand Down
6 changes: 3 additions & 3 deletions Tests/Tests/FORMTargetTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ - (void)testFieldPropertiesToUpdate {
@"condition": @"$employment_type == 2 && !missing($temporary_employee_reason)"};

FORMTarget *target = [[FORMTarget alloc] initWithDictionary:targetJSON];
NSArray *fieldProperties = [target fieldPropertiesToUpdate];
NSArray *fieldProperties = [target propertiesToUpdate];
XCTAssertEqual(fieldProperties.count, 1);
XCTAssertEqualObjects(fieldProperties, @[@"validation"]);

Expand All @@ -104,7 +104,7 @@ - (void)testFieldPropertiesToUpdate {
@"condition": @"$employment_type == 2 && !missing($temporary_employee_reason)"};

target = [[FORMTarget alloc] initWithDictionary:targetJSON];
fieldProperties = [target fieldPropertiesToUpdate];
fieldProperties = [target propertiesToUpdate];
XCTAssertEqual(fieldProperties.count, 0);

targetJSON = @{@"id": @"end_date",
Expand All @@ -114,7 +114,7 @@ - (void)testFieldPropertiesToUpdate {
@"condition": @"$employment_type == 2 && !missing($temporary_employee_reason)"};

target = [[FORMTarget alloc] initWithDictionary:targetJSON];
fieldProperties = [target fieldPropertiesToUpdate];
fieldProperties = [target propertiesToUpdate];
XCTAssertEqual(fieldProperties.count, 0);
}

Expand Down

0 comments on commit 4e0f405

Please sign in to comment.