Les tests sur les événéments n'étaient pas en phase avec la bonne redirection vers root après création
This commit is contained in:
parent
bb35cddaeb
commit
26854f3b7f
|
@ -53,7 +53,7 @@ class EventsControllerTest < ActionController::TestCase
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_redirected_to event_path(assigns(:event))
|
assert_redirected_to root_url
|
||||||
end
|
end
|
||||||
|
|
||||||
test "should show event" do
|
test "should show event" do
|
||||||
|
@ -68,7 +68,7 @@ class EventsControllerTest < ActionController::TestCase
|
||||||
|
|
||||||
test "should not get edit" do
|
test "should not get edit" do
|
||||||
get :edit, id: @event
|
get :edit, id: @event
|
||||||
assert_redirected_to event_path(assigns(:event))
|
assert_redirected_to root_url
|
||||||
end
|
end
|
||||||
|
|
||||||
test "should update event" do
|
test "should update event" do
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class EventTest < ActiveSupport::TestCase
|
class EventTest < ActiveSupport::TestCase
|
||||||
test "basic event" do
|
test 'basic event' do
|
||||||
@event = Event.new(
|
@event = Event.new(
|
||||||
title: 'hello world',
|
title: 'hello world',
|
||||||
start_time: Time.new(),
|
start_time: Time.new(),
|
||||||
|
@ -20,7 +20,7 @@ class EventTest < ActiveSupport::TestCase
|
||||||
assert_equal 32, @event.submitter_mail_id.size()
|
assert_equal 32, @event.submitter_mail_id.size()
|
||||||
end
|
end
|
||||||
|
|
||||||
test "validations" do
|
test 'validations' do
|
||||||
@event = Event.new(
|
@event = Event.new(
|
||||||
title: 'hello world',
|
title: 'hello world',
|
||||||
start_time: Time.new(),
|
start_time: Time.new(),
|
||||||
|
|
Loading…
Reference in New Issue