Skip to content

Commit

Permalink
[webui] Add a backend package to the delete_commented* tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Feb 19, 2014
1 parent 9a474ce commit 3b33b5e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/api/app/controllers/webui/project_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ def monitor

@buildresult = Buildresult.find( find_opt )
unless @buildresult
flash[:error] = "No build results for project '#{@project}'"
flash[:warning] = "No build results for project '#{@project}'"
redirect_to :action => :show, :project => params[:project]
return
end
Expand Down
1 change: 1 addition & 0 deletions src/api/script/start_test_backend
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ Suse::Backend.put('/source/home:Iggy:branches:kde4/BranchPack/myfile?user=king',
Suse::Backend.put('/source/kde4/kdebase/myfile2?user=king', 'DummyContent')
Suse::Backend.put('/source/kde4/kdelibs/my_patch.diff?user=king', 'argl')
Suse::Backend.put('/source/home:dmayr/x11vnc/README?user=king', 'just to delete')
Suse::Backend.put('/source/home:king/_config?user=king', 'Type: spec')

# manual placing of files
FileUtils.cp("#{Rails.root}/test/fixtures/backend/source/_pubkey", "#{Rails.root}/tmp/backend_data/projects/BaseDistro.pkg/_pubkey")
Expand Down
7 changes: 7 additions & 0 deletions src/api/test/fixtures/backend_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,10 @@ kde4_kdelibs:
expandedmd5: 1636661d96a88cd985d82dc611ebd723
maxmtime: 2013-09-30 15:50:37.000000000 Z
package: kde4_kdelibs
home_king_commentpack:
updated_at: 2013-09-30 15:50:41.000000000 Z
srcmd5: d41d8cd98f00b204e9800998ecf8427e
verifymd5: d41d8cd98f00b204e9800998ecf8427e
expandedmd5: d41d8cd98f00b204e9800998ecf8427e
maxmtime: 2013-09-30 15:50:37.000000000 Z
package: home_king_commentpack
12 changes: 6 additions & 6 deletions src/api/test/functional/comments_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest

end

test 'delete commented project' do
# BaseDistro has comments
test 'delete commented package' do
# home:king/commentpack has comments
login_king
delete '/source/home:king'
delete '/source/home:king/commentpack'
assert_response :success
end

test 'delete commented package' do
# BaseDistro3/pack2 has comments
test 'delete commented project' do
# home:king has comments
login_king
delete '/source/home:king/commentpack'
delete '/source/home:king'
assert_response :success
end

Expand Down
12 changes: 1 addition & 11 deletions src/api/test/functional/webui/messages_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ class Webui::MessagesTest < Webui::IntegrationTest
test 'add and remove message' do
use_js

login_king to: project_show_path(project: 'home:king')

# create admin's home to avoid interconnect
find_button('Create Project').click
login_king to: root_path

message = 'This is just a test'
visit root_path
page.wont_have_selector('#news-message')

find(:id, 'add-new-message').click
Expand All @@ -36,12 +32,6 @@ class Webui::MessagesTest < Webui::IntegrationTest
# check that it's gone
page.wont_have_selector('#news-message')

# and now to something completely different - we need to erase home:king
# again so that you still get the same interconnect s*** workflow (TODO!!!)
visit project_show_path(project: 'home:king')
find(:id, 'delete-project').click
find_button('Ok').click

end

end

0 comments on commit 3b33b5e

Please sign in to comment.