Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (22 sloc) 851 Bytes
// ControlCategoryTest.m
// SSToolkit
// Created by Sam Soffes on 4/15/11.
// Copyright 2011 Sam Soffes. All rights reserved.
#import <SSToolkit/UIControl+SSToolkitAdditions.h>
@interface ControlCategoryTest : GHTestCase
@implementation ControlCategoryTest
- (void)testRemoveAllTargets {
NSString *anotherObject = @"hi";
UIControl *control = [[UIControl alloc] initWithFrame:CGRectZero];
[control addTarget:self action:@selector(description) forControlEvents:UIControlEventTouchUpInside];
[control addTarget:anotherObject action:@selector(description) forControlEvents:UIControlEventTouchUpInside];
NSSet *targets = [NSSet setWithObjects:self, anotherObject, nil];
GHAssertEqualObjects([control allTargets], targets, nil);
[control removeAllTargets];
GHAssertTrue([[control allTargets] count] == 0, nil);
Jump to Line
Something went wrong with that request. Please try again.