Commit 3dd85d66d6cf1ca4678bf2e4492932be85ca1f08
Exists in
production
Merge branch 'staging' into production
Showing
3 changed files
with
7 additions
and
7 deletions
Show diff stats
plugins/juventude
test/unit/api/helpers_test.rb
| @@ -26,13 +26,13 @@ class APIHelpersTest < ActiveSupport::TestCase | @@ -26,13 +26,13 @@ class APIHelpersTest < ActiveSupport::TestCase | ||
| 26 | assert_equal user, current_user | 26 | assert_equal user, current_user |
| 27 | end | 27 | end |
| 28 | 28 | ||
| 29 | - should 'not get the current user with expired token' do | 29 | + should 'get the current user even with expired token' do |
| 30 | user = create_user('someuser') | 30 | user = create_user('someuser') |
| 31 | user.generate_private_token! | 31 | user.generate_private_token! |
| 32 | user.private_token_generated_at = DateTime.now.prev_year | 32 | user.private_token_generated_at = DateTime.now.prev_year |
| 33 | user.save | 33 | user.save |
| 34 | self.params = {:private_token => user.private_token} | 34 | self.params = {:private_token => user.private_token} |
| 35 | - assert_nil current_user | 35 | + assert_equal user, current_user |
| 36 | end | 36 | end |
| 37 | 37 | ||
| 38 | should 'get the person of current user' do | 38 | should 'get the person of current user' do |
test/unit/block_test.rb
| @@ -364,22 +364,22 @@ class BlockTest < ActiveSupport::TestCase | @@ -364,22 +364,22 @@ class BlockTest < ActiveSupport::TestCase | ||
| 364 | 364 | ||
| 365 | should 'return the icon block path' do | 365 | should 'return the icon block path' do |
| 366 | class NewBlock < Block; end | 366 | class NewBlock < Block; end |
| 367 | - assert_equal 'blocks/new_block/icon.png', NewBlock.icon_path | 367 | + assert_equal 'images/blocks/new_block/icon.png', NewBlock.icon_path |
| 368 | end | 368 | end |
| 369 | 369 | ||
| 370 | should 'return the icon block path for blocks inside modules' do | 370 | should 'return the icon block path for blocks inside modules' do |
| 371 | module SomeModule class NewBlock < Block; end; end | 371 | module SomeModule class NewBlock < Block; end; end |
| 372 | - assert_equal 'blocks/new_block/icon.png', SomeModule::NewBlock.icon_path | 372 | + assert_equal 'images/blocks/new_block/icon.png', SomeModule::NewBlock.icon_path |
| 373 | end | 373 | end |
| 374 | 374 | ||
| 375 | should 'return the default icon for blocks without icon' do | 375 | should 'return the default icon for blocks without icon' do |
| 376 | class NewBlock < Block; end | 376 | class NewBlock < Block; end |
| 377 | - assert_equal 'icon_block.png', NewBlock.default_icon_path | 377 | + assert_equal '/images/icon_block.png', NewBlock.default_icon_path |
| 378 | end | 378 | end |
| 379 | 379 | ||
| 380 | should 'return the default preview path for blocks without preview images' do | 380 | should 'return the default preview path for blocks without preview images' do |
| 381 | class NewBlock < Block; end | 381 | class NewBlock < Block; end |
| 382 | - assert_equal 'block_preview.png', NewBlock.default_preview_path | 382 | + assert_equal '/images/block_preview.png', NewBlock.default_preview_path |
| 383 | end | 383 | end |
| 384 | 384 | ||
| 385 | should 'get limit as a number when limit is string' do | 385 | should 'get limit as a number when limit is string' do |