~kalikiana/unity-action-api/cutedocs

« back to all changes in this revision

Viewing changes to test/cpp/tst_action.cpp

  • Committer: Antti Kaijanmäki
  • Date: 2013-07-12 12:56:59 UTC
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: antti.kaijanmaki@canonical.com-20130712125659-2x7vyhs6d5gbwiwm
Action::trigger() must check the enabled property.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
    spy.clear();
133
133
    action.setEnabled(false);
134
134
    QCOMPARE(spy.count(), 0);
 
135
 
 
136
    action.setEnabled(true);
 
137
    QSignalSpy trigger_spy(&action, SIGNAL(triggered(QVariant)));
 
138
    action.trigger();
 
139
    QCOMPARE(trigger_spy.count(), 1);
 
140
    trigger_spy.clear();
 
141
    action.setEnabled(false);
 
142
    action.trigger();
 
143
    QCOMPARE(trigger_spy.count(), 0);
135
144
}
136
145
 
137
146
void