Skip to content
Snippets Groups Projects
Unverified Commit 483a00c2 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix tests

parent 3371ebdd
No related branches found
No related tags found
No related merge requests found
require "test_helper"
class Research::DocumentsControllerTest < ActionDispatch::IntegrationTest
setup do
@research_document = research_documents(:one)
end
test "should get index" do
get research_documents_url
assert_response :success
end
test "should get new" do
get new_research_document_url
assert_response :success
end
test "should create research_document" do
assert_difference("Research::Document.count") do
post research_documents_url, params: { research_document: { data: @research_document.data, docid: @research_document.docid, ref: @research_document.ref, title: @research_document.title, university_id: @research_document.university_id, university_person_id: @research_document.university_person_id, url: @research_document.url } }
end
assert_redirected_to research_document_url(Research::Document.last)
end
test "should show research_document" do
get research_document_url(@research_document)
assert_response :success
end
test "should get edit" do
get edit_research_document_url(@research_document)
assert_response :success
end
test "should update research_document" do
patch research_document_url(@research_document), params: { research_document: { data: @research_document.data, docid: @research_document.docid, ref: @research_document.ref, title: @research_document.title, university_id: @research_document.university_id, university_person_id: @research_document.university_person_id, url: @research_document.url } }
assert_redirected_to research_document_url(@research_document)
end
test "should destroy research_document" do
assert_difference("Research::Document.count", -1) do
delete research_document_url(@research_document)
end
assert_redirected_to research_documents_url
end
end
......@@ -24,20 +24,11 @@
# fk_rails_ceb4d1344f (university_id => universities.id)
#
one:
university: one
university_person: one
default_document:
university: default_university
person: researcher
docid: MyString
data:
title: MyString
url: MyString
ref: MyString
two:
university: two
university_person: two
docid: MyString
data:
data:
title: MyString
url: MyString
ref: MyString
researcher:
email: researcher@osuny.org
first_name: Researcher
is_researcher: true
last_name: Osuny
name: Researcher Osuny
university: default_university
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment