Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change fixture names

  • Loading branch information...
commit 45e880c73da26a0ccef14efba03668315bb0a1d2 1 parent c8b487d
@FuriKuri authored
View
4 test/fixtures/books.yml
@@ -1,13 +1,13 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-one:
+clean_code:
title: Clean Code
description: A book about clean code.
image_url: image.png
owner_id: 1
lent_to_user_id: 1
-two:
+java:
title: Java for Beginners
description: Java book.
image_url:
View
12 test/fixtures/users.yml
@@ -1,11 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
-one:
- name: user1
+tim:
+ name: tim
password: secret
- email: user1@email.com
+ email: tim@email.com
-two:
- name: user2
+daniel:
+ name: damiel
password: secert
- email: user2@email.com
+ email: daniel@email.com
View
2  test/functional/books_controller_test.rb
@@ -2,7 +2,7 @@
class BooksControllerTest < ActionController::TestCase
setup do
- @book = books(:one)
+ @book = books(:clean_code)
end
test "should get index" do
View
2  test/functional/users_controller_test.rb
@@ -2,7 +2,7 @@
class UsersControllerTest < ActionController::TestCase
setup do
- @user = users(:one)
+ @user = users(:tim)
end
test "should get index" do
View
6 test/unit/user_test.rb
@@ -79,7 +79,7 @@ class UserTest < ActiveSupport::TestCase
test "should not save user with an existing name" do
user = User.new
- user.name = 'user1'
+ user.name = 'tim'
user.password = 'secret'
user.email = 'user@email.com'
assert user.invalid?
@@ -92,8 +92,4 @@ class UserTest < ActiveSupport::TestCase
user.email = 'user1@email.com'
assert user.invalid?
end
-
- # test "the truth" do
- # assert true
- # end
end
Please sign in to comment.
Something went wrong with that request. Please try again.