Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Please consult with the respective README file of each sample for usage and addi
* **test** - Compiles TypeScript and runs unit tests on the generated JS files, re-running tests automatically on chages
* **test-once** - Compiles TypeSCript and executes unit tests once, closing the browser once it's done
* **pree2e** - Updates WebDriver binary
* **start-sample** - Starts the photo album sample, without automatically opening the browser and navingating to the started app
* **start-sample** - Starts the photo album sample, without automatically opening the browser and navigating to the started app
* **start-sample:jquery** - Same as *start-sample* for the jQuery sample
* **install-sample-from-source** - Compiles TypeScript, packs this module and installs it into samples/photo_album
* **install-sample-from-source:jquery** - Same as *install-sample-from-source* for the jQuery sample
Expand Down
11 changes: 11 additions & 0 deletions projects/angular-cld/src/lib/cloudinary.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ describe('Cloudinary service', () => {
expect(service instanceof Cloudinary).toBe(true);
});

it('updates the configuration', () => {

const newConfig: CloudinaryConfiguration = {
cloud_name: 'new-service-test'
};

service.updateConfig(newConfig)

expect(service.config().cloud_name).toEqual(newConfig.cloud_name);
});

it('creates responsive urls by interacting with cloudinary core', () => {
const imgElement = {} as HTMLImageElement;
const options = {
Expand Down
4 changes: 4 additions & 0 deletions projects/angular-cld/src/lib/cloudinary.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export class Cloudinary {
return this._cloudinaryInstance.config();
}

updateConfig(configuration: CloudinaryConfiguration) {
this._cloudinaryInstance.config(configuration);
}

url(...parameters): string {
return this._cloudinaryInstance.url(...parameters);
}
Expand Down