This commit is contained in:
Igor Zubkov 2016-07-25 22:37:02 +03:00
parent 72a431a5e4
commit b4725a10f6
6 changed files with 11 additions and 7 deletions

View File

@ -18,3 +18,7 @@ Style/TrailingBlankLines:
Style/HashSyntax:
Enabled: true
# String interpolations should have spaces. e.g. "#{ good }", "#{bad}"
Style/SpaceInsideStringInterpolation:
EnforcedStyle: space

View File

@ -1 +1 @@
<p><%= form.text_field :landing_page, :style => 'width: 90%', :placeholder => "#{request.scheme}://#{request.host_with_port}/projects/demo/wiki/Wiki" %></p>
<p><%= form.text_field :landing_page, :style => 'width: 90%', :placeholder => "#{ request.scheme }://#{ request.host_with_port }/projects/demo/wiki/Wiki" %></p>

View File

@ -1 +1 @@
<p><%= form.text_field :landing_page, :size => 60, :placeholder => "#{request.scheme}://#{request.host_with_port}/projects/demo/wiki/Wiki" %></p>
<p><%= form.text_field :landing_page, :size => 60, :placeholder => "#{ request.scheme }://#{ request.host_with_port }/projects/demo/wiki/Wiki" %></p>

View File

@ -1 +1 @@
<p><%= form.text_field :landing_page, :style => 'width: 90%', :placeholder => "#{request.scheme}://#{request.host_with_port}/projects/demo/wiki/Wiki" %></p>
<p><%= form.text_field :landing_page, :style => 'width: 90%', :placeholder => "#{ request.scheme }://#{ request.host_with_port }/projects/demo/wiki/Wiki" %></p>

View File

@ -17,8 +17,8 @@ class ProjectsControllerTest < ActionController::TestCase
def test_redirect_to_landing_page
@project = Project.generate!(identifier: 'demo',
landing_page: "http://#{@request.host}/projects/demo/news")
landing_page: "http://#{ @request.host }/projects/demo/news")
get :show, id: @project.identifier
assert_redirected_to "http://#{@request.host}/projects/#{@project.identifier}/news"
assert_redirected_to "http://#{ @request.host }/projects/#{ @project.identifier }/news"
end
end

View File

@ -15,9 +15,9 @@ class WelcomeControllerTest < ActionController::TestCase
end
def test_redirect_to_landing_page
@user = User.generate!(landing_page: "http://#{@request.host}/projects")
@user = User.generate!(landing_page: "http://#{ @request.host }/projects")
@request.session[:user_id] = @user.id
get :index
assert_redirected_to "http://#{@request.host}/projects"
assert_redirected_to "http://#{ @request.host }/projects"
end
end