Files
Parse-SDK-iOS-OSX/Tests/Unit/FileCommandTests.m
2015-08-13 10:55:21 -07:00

30 lines
873 B
Objective-C

/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "PFHTTPRequest.h"
#import "PFRESTFileCommand.h"
#import "PFTestCase.h"
@interface FileCommandTests : PFTestCase
@end
@implementation FileCommandTests
- (void)testUploadFileCommand {
PFRESTFileCommand *command = [PFRESTFileCommand uploadCommandForFileWithName:@"a" sessionToken:@"yolo"];
XCTAssertNotNil(command);
XCTAssertEqualObjects(command.httpPath, @"files/a");
XCTAssertEqualObjects(command.httpMethod, PFHTTPRequestMethodPOST);
XCTAssertNil(command.parameters);
XCTAssertEqualObjects(command.sessionToken, @"yolo");
}
@end