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:
authorgitlabhq <m@gitlabhq.com>2011-11-02 00:51:20 +0400
committergitlabhq <m@gitlabhq.com>2011-11-02 00:51:20 +0400
commit5e12f10c142ca5add14e5c752cf9ef6d88c4dfd8 (patch)
treefe38fb49897e900ef71c1d01de19ebd230507d09
parent82d16ccfd189f5bdc65090ac7af1d4eef1f1774e (diff)
fixes
-rw-r--r--app/views/layouts/_head_panel.html.erb6
-rw-r--r--app/views/layouts/devise.html.haml3
-rw-r--r--spec/requests/issues_spec.rb99
-rw-r--r--spec/requests/projects_spec.rb4
-rw-r--r--spec/support/login.rb8
-rw-r--r--vendor/assets/stylesheets/jquery-ui/jquery-ui.css2
6 files changed, 81 insertions, 41 deletions
diff --git a/app/views/layouts/_head_panel.html.erb b/app/views/layouts/_head_panel.html.erb
index e6f36e3fd06..590e16a2f13 100644
--- a/app/views/layouts/_head_panel.html.erb
+++ b/app/views/layouts/_head_panel.html.erb
@@ -10,7 +10,10 @@
<%= current_user.name %>
<% end %>
<%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
- </div>
+ </div>
+ <div class="search">
+ <%= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" %>
+ </div>
<!-- .login-top -->
<nav>
<%= link_to root_path, :class => current_page?(root_path) ? "current dashboard" : "dashboard" do %>
@@ -31,7 +34,6 @@
<div class="span-24">
<div class="span-10">
<span class="search-holder">
- <%= text_field_tag "search", nil, :placeholder => "Search" %>
</span>
</div>
<div class="right">
diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml
index d814a05807f..968fe58d39c 100644
--- a/app/views/layouts/devise.html.haml
+++ b/app/views/layouts/devise.html.haml
@@ -11,6 +11,5 @@
REQ_URI = "#{request.env["REQUEST_URI"]}";
REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
%body.login-page
- #container
- = render :partial => "layouts/flash"
+ = render :partial => "layouts/flash"
= yield
diff --git a/spec/requests/issues_spec.rb b/spec/requests/issues_spec.rb
index b13e43adc6c..0ff70308605 100644
--- a/spec/requests/issues_spec.rb
+++ b/spec/requests/issues_spec.rb
@@ -5,7 +5,10 @@ describe "Issues" do
before do
login_as :user
+ @user2 = Factory :user
+
project.add_access(@user, :read, :write)
+ project.add_access(@user2, :read, :write)
end
describe "GET /issues" do
@@ -49,20 +52,20 @@ describe "Issues" do
end
it "should show only open" do
- should have_content(@issue.title)
+ should have_content(@issue.title[0..25])
should have_no_content(@closed_issue.title)
end
it "should show only closed" do
choose "closed_issues"
should have_no_content(@issue.title)
- should have_content(@closed_issue.title)
+ should have_content(@closed_issue.title[0..25])
end
it "should show all" do
choose "all_issues"
- should have_content(@issue.title)
- should have_content(@closed_issue.title)
+ should have_content(@issue.title[0..25])
+ should have_content(@closed_issue.title[0..25])
end
end
end
@@ -78,35 +81,71 @@ describe "Issues" do
end
describe "fill in" do
- before do
- fill_in "issue_title", :with => "bug 345"
- click_link "Select user"
- click_link @user.name
- end
-
- it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
-
- it "should add new issue to table" do
- click_button "Save"
-
- page.should_not have_content("Add new issue")
- page.should have_content @user.name
- page.should have_content "bug 345"
- page.should have_content project.name
+ describe 'assign to me' do
+ before do
+ fill_in "issue_title", :with => "bug 345"
+ click_link "Select user"
+ within "#issue_assignee_id-menu" do
+ click_link @user.name
+ end
+ end
+
+ it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
+
+ it "should add new issue to table" do
+ click_button "Save"
+
+ page.should_not have_content("Add new issue")
+ page.should have_content @user.name
+ page.should have_content "bug 345"
+ page.should have_content project.name
+ end
+
+ it "should call send mail" do
+ Notify.should_not_receive(:new_issue_email)
+ click_button "Save"
+ end
+
+ it "should send valid email to user with email & password" do
+ click_button "Save"
+ ActionMailer::Base.deliveries.last.should be_nil
+ end
end
- it "should call send mail" do
- Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true))
- click_button "Save"
- end
+ describe 'assign to other' do
+ before do
+ fill_in "issue_title", :with => "bug 345"
+ click_link "Select user"
+ within "#issue_assignee_id-menu" do
+ click_link @user2.name
+ end
+ end
+
+ it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
+
+ it "should add new issue to table" do
+ click_button "Save"
+
+ page.should_not have_content("Add new issue")
+ page.should have_content @user2.name
+ page.should have_content "bug 345"
+ page.should have_content project.name
+ end
+
+ it "should call send mail" do
+ Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true))
+ click_button "Save"
+ end
+
+ it "should send valid email to user with email & password" do
+ click_button "Save"
+ issue = Issue.last
+ email = ActionMailer::Base.deliveries.last
+ email.subject.should have_content("New Issue was created")
+ email.body.should have_content(issue.title)
+ email.body.should have_content(issue.assignee.name)
+ end
- it "should send valid email to user with email & password" do
- click_button "Save"
- issue = Issue.last
- email = ActionMailer::Base.deliveries.last
- email.subject.should have_content("New Issue was created")
- email.body.should have_content(issue.title)
- email.body.should have_content(issue.assignee.name)
end
end
end
diff --git a/spec/requests/projects_spec.rb b/spec/requests/projects_spec.rb
index e1e9773c850..3d8971579b9 100644
--- a/spec/requests/projects_spec.rb
+++ b/spec/requests/projects_spec.rb
@@ -13,14 +13,14 @@ describe "Projects" do
end
it "should have link to new project" do
- page.should have_content("New Project")
+ page.should have_content("Create new project")
end
end
describe "GET /projects/new" do
before do
visit projects_path
- click_link "New Project"
+ click_link "Create new project"
end
it "should be correct path" do
diff --git a/spec/support/login.rb b/spec/support/login.rb
index a700c8b94dd..026e336df58 100644
--- a/spec/support/login.rb
+++ b/spec/support/login.rb
@@ -12,15 +12,15 @@ module LoginMacros
end
visit new_user_session_path
- fill_in "Email", :with => @user.email
- fill_in "Password", :with => "123456"
+ fill_in "user_email", :with => @user.email
+ fill_in "user_password", :with => "123456"
click_button "Sign in"
end
def login_with(user)
visit new_user_session_path
- fill_in "Email", :with => user.email
- fill_in "Password", :with => "123456"
+ fill_in "user_email", :with => user.email
+ fill_in "user_password", :with => "123456"
click_button "Sign in"
end
diff --git a/vendor/assets/stylesheets/jquery-ui/jquery-ui.css b/vendor/assets/stylesheets/jquery-ui/jquery-ui.css
index 0cd7af67f1f..a6b4c363716 100644
--- a/vendor/assets/stylesheets/jquery-ui/jquery-ui.css
+++ b/vendor/assets/stylesheets/jquery-ui/jquery-ui.css
@@ -445,7 +445,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; }
-.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; background: #333; color:#eaeaea }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; background: #F7F7F7; color:#555; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0;}
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; background:#eaeaea}
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }