* fixing broken tests from changing how dev/test artifact checks are made
This commit is contained in:
parent
423604f869
commit
c985c4690b
|
|
@ -88,7 +88,7 @@
|
|||
|
||||
// if the current version doesn't not match the server version, attempt to do an upgrade
|
||||
function shouldUpdate(currentVersion, version) {
|
||||
if(version == null || version == "") {
|
||||
if(version === undefined || version == null || version == "") {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -51,5 +51,9 @@ SampleApp::Application.configure do
|
|||
else
|
||||
config.websocket_gateway_enable = false
|
||||
end
|
||||
|
||||
# this is totally awful and silly; the reason this exists is so that if you upload an artifact
|
||||
# through jam-admin, then jam-web can point users at it. I think 99% of devs won't even see or care about this config, and 0% of users
|
||||
config.jam_admin_root_url = 'http://localhost:3333'
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ describe "Artifact API ", :type => :api do
|
|||
it "matches an artifact" do
|
||||
get '/api/versioncheck.json', { :os=>'Win32', :product=>'JamClient'}
|
||||
last_response.status.should eql(200)
|
||||
JSON.parse(last_response.body).should eql({ "version" => @artifact.version, "uri" => @artifact.uri.url, "size" => @artifact.size, "sha1" => @artifact.sha1})
|
||||
JSON.parse(last_response.body).should eql({ "version" => @artifact.version, "uri" => Rails.application.config.jam_admin_root_url + @artifact.uri.url, "size" => @artifact.size, "sha1" => @artifact.sha1})
|
||||
end
|
||||
|
||||
it "matches no artifact" do
|
||||
|
|
|
|||
|
|
@ -561,14 +561,9 @@ describe "Music Session API ", :type => :api do
|
|||
music_session = FactoryGirl.create(:music_session, :creator => user, :description => "My Session")
|
||||
client = FactoryGirl.create(:connection, :user => user)
|
||||
|
||||
|
||||
|
||||
puts MusicSessionHistory.find_by_music_session_id(music_session.id)
|
||||
|
||||
put "/api/sessions/#{music_session.id}/perf.json", "CONTENT_TYPE" => "application/json"
|
||||
last_response.status.should == 302
|
||||
redirect = last_response.headers["Location"]
|
||||
p redirect
|
||||
|
||||
put redirect + '.json', "CONTENT_TYPE" => 'application/json'
|
||||
last_response.status.should == 200
|
||||
|
|
|
|||
Loading…
Reference in New Issue