Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-08-11 02:07:50 +0400
committerRobert Speicher <rspeicher@gmail.com>2012-08-11 02:25:15 +0400
commit775418918782d5284000ed0bfea364458c748567 (patch)
treec31e3633a3bcbed17b000f0165cf35edad41f7ca /spec/requests/admin
parent1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff)
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'spec/requests/admin')
-rw-r--r--spec/requests/admin/admin_hooks_spec.rb6
-rw-r--r--spec/requests/admin/admin_projects_spec.rb16
-rw-r--r--spec/requests/admin/admin_users_spec.rb16
3 files changed, 19 insertions, 19 deletions
diff --git a/spec/requests/admin/admin_hooks_spec.rb b/spec/requests/admin/admin_hooks_spec.rb
index e8a345b689f..2f026aabab8 100644
--- a/spec/requests/admin/admin_hooks_spec.rb
+++ b/spec/requests/admin/admin_hooks_spec.rb
@@ -3,8 +3,8 @@ require 'spec_helper'
describe "Admin::Hooks" do
before do
@project = Factory :project,
- :name => "LeGiT",
- :code => "LGT"
+ name: "LeGiT",
+ code: "LGT"
login_as :admin
@system_hook = Factory :system_hook
@@ -30,7 +30,7 @@ describe "Admin::Hooks" do
before do
@url = Faker::Internet.uri("http")
visit admin_hooks_path
- fill_in "hook_url", :with => @url
+ fill_in "hook_url", with: @url
expect { click_button "Add System Hook" }.to change(SystemHook, :count).by(1)
end
diff --git a/spec/requests/admin/admin_projects_spec.rb b/spec/requests/admin/admin_projects_spec.rb
index 37cb7d6704d..0ce66f5f868 100644
--- a/spec/requests/admin/admin_projects_spec.rb
+++ b/spec/requests/admin/admin_projects_spec.rb
@@ -3,8 +3,8 @@ require 'spec_helper'
describe "Admin::Projects" do
before do
@project = Factory :project,
- :name => "LeGiT",
- :code => "LGT"
+ name: "LeGiT",
+ code: "LGT"
login_as :admin
end
@@ -47,8 +47,8 @@ describe "Admin::Projects" do
describe "Update project" do
before do
- fill_in "project_name", :with => "Big Bang"
- fill_in "project_code", :with => "BB1"
+ fill_in "project_name", with: "Big Bang"
+ fill_in "project_code", with: "BB1"
click_button "Save Project"
@project.reload
end
@@ -85,9 +85,9 @@ describe "Admin::Projects" do
describe "POST /admin/projects" do
before do
visit new_admin_project_path
- fill_in 'project_name', :with => 'NewProject'
- fill_in 'project_code', :with => 'NPR'
- fill_in 'project_path', :with => 'gitlabhq_1'
+ fill_in 'project_name', with: 'NewProject'
+ fill_in 'project_code', with: 'NPR'
+ fill_in 'project_path', with: 'gitlabhq_1'
expect { click_button "Create project" }.to change { Project.count }.by(1)
@project = Project.last
end
@@ -109,7 +109,7 @@ describe "Admin::Projects" do
end
it "should create new user" do
- select @new_user.name, :from => "user_ids"
+ select @new_user.name, from: "user_ids"
expect { click_button "Add" }.to change { UsersProject.count }.by(1)
page.should have_content @new_user.name
current_path.should == admin_project_path(@project)
diff --git a/spec/requests/admin/admin_users_spec.rb b/spec/requests/admin/admin_users_spec.rb
index ba6831e3d8b..68358bf0a0f 100644
--- a/spec/requests/admin/admin_users_spec.rb
+++ b/spec/requests/admin/admin_users_spec.rb
@@ -22,10 +22,10 @@ describe "Admin::Users" do
before do
@password = "123ABC"
visit new_admin_user_path
- fill_in "user_name", :with => "Big Bang"
- fill_in "user_email", :with => "bigbang@mail.com"
- fill_in "user_password", :with => @password
- fill_in "user_password_confirmation", :with => @password
+ fill_in "user_name", with: "Big Bang"
+ fill_in "user_email", with: "bigbang@mail.com"
+ fill_in "user_password", with: @password
+ fill_in "user_password_confirmation", with: @password
end
it "should create new user" do
@@ -40,7 +40,7 @@ describe "Admin::Users" do
end
it "should call send mail" do
- Notify.should_receive(:new_user_email).and_return(stub(:deliver => true))
+ Notify.should_receive(:new_user_email).and_return(stub(deliver: true))
User.observers.enable :user_observer do
click_button "Save"
@@ -88,8 +88,8 @@ describe "Admin::Users" do
describe "Update user" do
before do
- fill_in "user_name", :with => "Big Bang"
- fill_in "user_email", :with => "bigbang@mail.com"
+ fill_in "user_name", with: "Big Bang"
+ fill_in "user_email", with: "bigbang@mail.com"
check "user_admin"
click_button "Save"
end
@@ -114,7 +114,7 @@ describe "Admin::Users" do
end
it "should create new user" do
- select @new_project.name, :from => "project_ids"
+ select @new_project.name, from: "project_ids"
expect { click_button "Add" }.to change { UsersProject.count }.by(1)
page.should have_content @new_project.name
current_path.should == admin_user_path(@user)