expose customer keys

parent cd8412eb
......@@ -87,11 +87,11 @@
XCTAssertNotNil(json);
XCTAssertEqual(json.count, 1);
XCTAssertNotNil(customer);
XCTAssertEqual(customer[@"email"], @"john@doe.com");
XCTAssertEqual(customer[@"first_name"], @"John");
XCTAssertEqual(customer[@"last_name"], @"Doe");
XCTAssertEqual(customer[@"password"], @"pass");
XCTAssertEqual(customer[@"password_confirmation"], @"pass");
XCTAssertEqual(customer[BUYAccountEmailKey], @"john@doe.com");
XCTAssertEqual(customer[BUYAccountFirstNameKey], @"John");
XCTAssertEqual(customer[BUYAccountLastNameKey], @"Doe");
XCTAssertEqual(customer[BUYAccountPasswordKey], @"pass");
XCTAssertEqual(customer[BUYAccountPasswordConfirmationKey], @"pass");
}
#pragma mark - Utilities -
......
......@@ -309,11 +309,11 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
XCTAssertNil(error);
NSDictionary *dict = @{@"customer": @{
@"first_name": @"michael",
@"last_name": @"scott",
@"email": @"fake@example.com",
@"password": @"password",
@"password_confirmation": @"password"
BUYAccountFirstNameKey: @"michael",
BUYAccountLastNameKey: @"scott",
BUYAccountEmailKey: @"fake@example.com",
BUYAccountPasswordKey: @"password",
BUYAccountPasswordConfirmationKey: @"password"
}};
XCTAssertEqualObjects(payload, dict);
}
......
......@@ -27,6 +27,12 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
OBJC_EXTERN NSString * const BUYAccountFirstNameKey;
OBJC_EXTERN NSString * const BUYAccountLastNameKey;
OBJC_EXTERN NSString * const BUYAccountEmailKey;
OBJC_EXTERN NSString * const BUYAccountPasswordKey;
OBJC_EXTERN NSString * const BUYAccountPasswordConfirmationKey;
@class BUYAccountCredentialItem;
/**
......
......@@ -27,11 +27,11 @@
#import "BUYAccountCredentials.h"
#import "BUYAssert.h"
static NSString * const BUYAccountFirstNameKey = @"first_name";
static NSString * const BUYAccountLastNameKey = @"last_name";
static NSString * const BUYAccountEmailKey = @"email";
static NSString * const BUYAccountPasswordKey = @"password";
static NSString * const BUYAccountPasswordConfirmationKey = @"password_confirmation";
NSString * const BUYAccountFirstNameKey = @"first_name";
NSString * const BUYAccountLastNameKey = @"last_name";
NSString * const BUYAccountEmailKey = @"email";
NSString * const BUYAccountPasswordKey = @"password";
NSString * const BUYAccountPasswordConfirmationKey = @"password_confirmation";
#pragma mark - BUYAccountCredentials -
@interface BUYAccountCredentials()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment