Commit f53cf3c4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Revert js changes to name_with_namespace

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent a87bd1d4
......@@ -50,7 +50,7 @@ describe('glDropdown', function describeDropdown() {
search: {
fields: ['name']
},
text: project => (project.full_name || project.name),
text: project => (project.name_with_namespace || project.name),
id: project => project.id,
}, extraOpts);
this.dropdownButtonElement = $('#js-project-dropdown', this.dropdownContainerElement).glDropdown(options);
......@@ -76,7 +76,7 @@ describe('glDropdown', function describeDropdown() {
});
it('escapes HTML as text', () => {
this.projectsData[0].full_name = '<script>alert("testing");</script>';
this.projectsData[0].name_with_namespace = '<script>alert("testing");</script>';
initDropDown.call(this, false);
......@@ -88,7 +88,7 @@ describe('glDropdown', function describeDropdown() {
});
it('should output HTML when highlighting', () => {
this.projectsData[0].full_name = 'testing';
this.projectsData[0].name_with_namespace = 'testing';
$('.dropdown-input .dropdown-input-field').val('test');
initDropDown.call(this, false, true, {
......
......@@ -24,7 +24,7 @@ describe('ProjectsStore', () => {
const processedProjects = store.getSearchedProjects();
expect(processedProjects.length).toBe(1);
expect(processedProjects[0].id).toBe(mockRawProject.id);
expect(processedProjects[0].namespace).toBe(mockRawProject.full_name);
expect(processedProjects[0].namespace).toBe(mockRawProject.name_with_namespace);
expect(processedProjects[0].webUrl).toBe(mockRawProject.web_url);
expect(processedProjects[0].avatarUrl).toBe(mockRawProject.avatar_url);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment