Add rubocop spacing rules
We were following these rules in most places; we just didn't define them anywhere.
This commit is contained in:
@@ -184,9 +184,9 @@ describe "Legislation Draft Versions" do
|
||||
scenario "View annotations and comments" do
|
||||
draft_version = create(:legislation_draft_version, :published)
|
||||
annotation1 = create(:legislation_annotation, draft_version: draft_version, text: "my annotation",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10 }])
|
||||
create(:legislation_annotation, draft_version: draft_version, text: "my other annotation",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 12, "end" => "/p[1]", "endOffset" => 19}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 12, "end" => "/p[1]", "endOffset" => 19 }])
|
||||
comment = create(:comment, commentable: annotation1)
|
||||
|
||||
visit legislation_process_draft_version_path(draft_version.process, draft_version)
|
||||
@@ -203,7 +203,7 @@ describe "Legislation Draft Versions" do
|
||||
scenario "Publish new comment for an annotation from comments box" do
|
||||
draft_version = create(:legislation_draft_version, :published)
|
||||
annotation = create(:legislation_annotation, draft_version: draft_version, text: "my annotation",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 6, "end" => "/p[1]", "endOffset" => 11}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 6, "end" => "/p[1]", "endOffset" => 11 }])
|
||||
|
||||
visit legislation_process_draft_version_path(draft_version.process, draft_version)
|
||||
|
||||
@@ -227,9 +227,9 @@ describe "Legislation Draft Versions" do
|
||||
scenario "View annotations and comments in an included range" do
|
||||
draft_version = create(:legislation_draft_version, :published)
|
||||
annotation1 = create(:legislation_annotation, draft_version: draft_version, text: "my annotation",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 5}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 5 }])
|
||||
annotation2 = create(:legislation_annotation, draft_version: draft_version, text: "my other annotation",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 10}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 1, "end" => "/p[1]", "endOffset" => 10 }])
|
||||
|
||||
visit legislation_process_draft_version_path(draft_version.process, draft_version)
|
||||
|
||||
@@ -249,9 +249,9 @@ describe "Legislation Draft Versions" do
|
||||
before do
|
||||
@draft_version = create(:legislation_draft_version, :published)
|
||||
create(:legislation_annotation, draft_version: @draft_version, text: "my annotation", quote: "ipsum",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 6, "end" => "/p[1]", "endOffset" => 11}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 6, "end" => "/p[1]", "endOffset" => 11 }])
|
||||
create(:legislation_annotation, draft_version: @draft_version, text: "my other annotation", quote: "audiam",
|
||||
ranges: [{"start" => "/p[3]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11}])
|
||||
ranges: [{ "start" => "/p[3]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11 }])
|
||||
end
|
||||
|
||||
scenario "See all annotations for a draft version" do
|
||||
@@ -267,11 +267,11 @@ describe "Legislation Draft Versions" do
|
||||
@draft_version_1 = create(:legislation_draft_version, :published, process: @process,
|
||||
title: "Version 1", body: "Text with quote for version 1")
|
||||
create(:legislation_annotation, draft_version: @draft_version_1, text: "annotation for version 1", quote: "quote for version 1",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30 }])
|
||||
@draft_version_2 = create(:legislation_draft_version, :published, process: @process,
|
||||
title: "Version 2", body: "Text with quote for version 2")
|
||||
create(:legislation_annotation, draft_version: @draft_version_2, text: "annotation for version 2", quote: "quote for version 2",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 11, "end" => "/p[1]", "endOffset" => 30 }])
|
||||
end
|
||||
|
||||
scenario "without js" do
|
||||
@@ -301,9 +301,9 @@ describe "Legislation Draft Versions" do
|
||||
before do
|
||||
@draft_version = create(:legislation_draft_version, :published)
|
||||
create(:legislation_annotation, draft_version: @draft_version, text: "my annotation", quote: "ipsum",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 6, "end" => "/p[1]", "endOffset" => 11}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 6, "end" => "/p[1]", "endOffset" => 11 }])
|
||||
@annotation = create(:legislation_annotation, draft_version: @draft_version, text: "my other annotation", quote: "audiam",
|
||||
ranges: [{"start" => "/p[3]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11}])
|
||||
ranges: [{ "start" => "/p[3]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11 }])
|
||||
end
|
||||
|
||||
scenario "See one annotation with replies for a draft version" do
|
||||
|
||||
@@ -180,13 +180,13 @@ describe "Legislation" do
|
||||
status: "published")
|
||||
annotation0 = create(:legislation_annotation,
|
||||
draft_version: draft_version_1, text: "my annotation123",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10 }])
|
||||
annotation1 = create(:legislation_annotation,
|
||||
draft_version: draft_version_2, text: "hola",
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 5, "end" => "/p[1]", "endOffset" => 10 }])
|
||||
annotation2 = create(:legislation_annotation,
|
||||
draft_version: draft_version_2,
|
||||
ranges: [{"start" => "/p[1]", "startOffset" => 12, "end" => "/p[1]", "endOffset" => 19}])
|
||||
ranges: [{ "start" => "/p[1]", "startOffset" => 12, "end" => "/p[1]", "endOffset" => 19 }])
|
||||
create(:text_comment, user: user, commentable_id: annotation0.id, body: "Comment 0")
|
||||
create(:text_comment, user: user, commentable_id: annotation1.id, body: "Comment 1")
|
||||
create(:text_comment, user: user, commentable_id: annotation2.id, body: "Comment 2")
|
||||
@@ -238,7 +238,7 @@ describe "Legislation" do
|
||||
end
|
||||
|
||||
it "download execl file test" do
|
||||
get :resume, params: {id: @process, format: :xlsx}
|
||||
get :resume, params: { id: @process, format: :xlsx }
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user