mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Switch assert_not_equal to refute_equal
Preferring to use minitest methods here instead of test-unit.
This commit is contained in:
parent
dea3b1b58e
commit
71c95c0d01
4 changed files with 7 additions and 7 deletions
|
|
@ -25,7 +25,7 @@ class NotesControllerTest < ActionController::TestCase
|
|||
|
||||
note = users(:admin_user).notes.first
|
||||
|
||||
assert_not_equal "test", note.body
|
||||
refute_equal "test", note.body
|
||||
post :update, id: note.id, note: {body: "test"}, format: :js
|
||||
assert_equal "test", note.reload.body
|
||||
end
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ class TodosControllerTest < ActionController::TestCase
|
|||
todo = users(:admin_user).todos.active.first
|
||||
context = users(:admin_user).contexts.first
|
||||
|
||||
assert_not_equal todo.context.id, context.id
|
||||
refute_equal todo.context.id, context.id
|
||||
|
||||
xhr :post, :change_context, :id => todo.id, :todo=>{:context_id => context.id}, :_source_view=>"todo"
|
||||
assert assigns['context_changed'], "context should have changed"
|
||||
|
|
@ -820,7 +820,7 @@ class TodosControllerTest < ActionController::TestCase
|
|||
next_todo = Todo.where(:recurring_todo_id => recurring_todo_1.id, :state => 'active').first
|
||||
assert_equal "Call Bill Gates every day", next_todo.description
|
||||
# check that the new todo is not the same as todo_1
|
||||
assert_not_equal todo_1.id, next_todo.id
|
||||
refute_equal todo_1.id, next_todo.id
|
||||
|
||||
# change recurrence pattern to monthly and set show_from 2 days before due
|
||||
# date this forces the next todo to be put in the tickler
|
||||
|
|
@ -891,7 +891,7 @@ class TodosControllerTest < ActionController::TestCase
|
|||
assert !new_todo.nil?, "the todo should be in the tickler"
|
||||
|
||||
assert_equal "Call Bill Gates every day", new_todo.description
|
||||
assert_not_equal todo_1.id, new_todo.id, "check that the new todo is not the same as todo_1"
|
||||
refute_equal todo_1.id, new_todo.id, "check that the new todo is not the same as todo_1"
|
||||
assert !new_todo.show_from.nil?, "check that the new_todo is in the tickler to show next month"
|
||||
|
||||
assert_equal today + 1.month, new_todo.show_from
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class RecurringTodosTest < ActionDispatch::IntegrationTest
|
|||
rt.reload # then there should be two todos referencing
|
||||
assert_equal 2, rt.todos.size
|
||||
todo2 = Todo.where(:recurring_todo_id => rt.id, :state => 'active').first
|
||||
assert_not_equal todo2.id, todo.id # and the todos should be different
|
||||
refute_equal todo2.id, todo.id # and the todos should be different
|
||||
|
||||
# when I delete the recurring todo
|
||||
delete_via_redirect "/recurring_todos/#{rt.id}", :_source_view => 'todo'
|
||||
|
|
@ -40,4 +40,4 @@ class RecurringTodosTest < ActionDispatch::IntegrationTest
|
|||
assert todo.recurring_todo_id.nil?
|
||||
assert todo2.recurring_todo_id.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class UserTest < ActiveSupport::TestCase
|
|||
def test_generate_token_updates_token
|
||||
old_token = @admin_user.token
|
||||
@admin_user.generate_token
|
||||
assert_not_equal old_token, @admin_user.token
|
||||
refute_equal old_token, @admin_user.token
|
||||
end
|
||||
|
||||
def test_find_admin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue