summaryrefslogtreecommitdiff
path: root/spec/models/project_spec.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-02 18:05:06 +0200
committerRémy Coutable <remy@rymai.me>2016-06-14 13:18:14 +0200
commit515205d3c1c6655302ed0ae44cc5954dead7ae79 (patch)
tree5ac24884eb0e6faf56e1e460260303fbdb14b9cf /spec/models/project_spec.rb
parent6d103a2f4764441b1650ba6d790732056c9a8516 (diff)
downloadgitlab-ce-515205d3c1c6655302ed0ae44cc5954dead7ae79.tar.gz
UI and copywriting improvements13948-access-request-to-projects-and-groups
+ Move 'Edit Project/Group' out of membership-related partial + Show the access request buttons only to logged-in users + Put the request access buttons out of in a more visible button + Improve the copy in the #remove_member_message helper Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb19
1 files changed, 7 insertions, 12 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index d5a4b73affd..30aa2b70c8d 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -29,17 +29,6 @@ describe Project, models: true do
it { is_expected.to have_many(:variables) }
it { is_expected.to have_many(:triggers) }
it { is_expected.to have_many(:todos).dependent(:destroy) }
-
- describe '#project_members' do
- let(:user) { create(:user) }
- let(:project) { create(:project) }
-
- before { project.request_access(user) }
-
- it 'does not includes membership requests' do
- expect(user.project_members).to be_empty
- end
- end
end
describe 'modules' do
@@ -100,11 +89,17 @@ describe Project, models: true do
it { is_expected.to respond_to(:repo_exists?) }
it { is_expected.to respond_to(:update_merge_requests) }
it { is_expected.to respond_to(:execute_hooks) }
- it { is_expected.to respond_to(:name_with_namespace) }
it { is_expected.to respond_to(:owner) }
it { is_expected.to respond_to(:path_with_namespace) }
end
+ describe '#name_with_namespace' do
+ let(:project) { build_stubbed(:empty_project) }
+
+ it { expect(project.name_with_namespace).to eq "#{project.namespace.human_name} / #{project.name}" }
+ it { expect(project.human_name).to eq project.name_with_namespace }
+ end
+
describe '#to_reference' do
let(:project) { create(:empty_project) }