Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify search layout for export email controller, provide a DRY meth…
…od for getting search layout except on XHR and include test case for export email controller.
- Loading branch information
1 parent
8986bb9
commit dfd40f1
Showing
4 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'test_helper' | ||
class ExportEmailControllerTest < ActionController::TestCase | ||
fixtures :requests, :referents, :referent_values, :dispatched_services, :service_responses | ||
|
||
setup do | ||
@email_service_response = service_responses(:service_response3) | ||
@txt_holding_service_response = service_responses(:service_response9) | ||
end | ||
|
||
test "layout" do | ||
get(:email, :id => @email_service_response.id) | ||
assert_response :success | ||
assert_select "body div.umlaut-container", 1 | ||
assert_select "div.email", 1 | ||
end | ||
|
||
test "layout xhr" do | ||
xhr :get, :email, :id => @email_service_response.id | ||
assert_response :success | ||
# Assert that no layout was included in the request | ||
assert_select "body", 0 | ||
assert_select "div.umlaut-container", 0 | ||
assert_select "div.email", 1 | ||
end | ||
end |