Commit 142fbb63bc58e9632687e93380ffbcda6f86f6b9
1 parent
72e1de65
Exists in
master
and in
23 other branches
ActionItem152: is this request a lightbox?
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1230 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
12 additions
and
0 deletions
Show diff stats
app/helpers/lightbox_helper.rb
test/unit/lightbox_helper_text.rb
| ... | ... | @@ -44,4 +44,12 @@ class LightboxHelperTest < Test::Unit::TestCase |
| 44 | 44 | assert_equal '[button]', lightbox_button('type', 'label', { :action => 'popup'}) |
| 45 | 45 | end |
| 46 | 46 | |
| 47 | + should 'tell if rendering inside lightbox' do | |
| 48 | + request = mock | |
| 49 | + expects(:request).returns(request) | |
| 50 | + request.espects(:xhr?).returns(true) | |
| 51 | + | |
| 52 | + assert lightbox? | |
| 53 | + end | |
| 54 | + | |
| 47 | 55 | end | ... | ... |